We show that hexagonally ordered Equation or symbol description not availableHfO2 structures can either be grown to form a self-ordered pore or tube array, depending only on the electrochemical conditions during anodization of Hf in fluoride containing electrolytes. The water content in the electrolyte is the main factor affecting the transition from pores to tubes and the regularity of the structures. In the self-ordered nanoporous anodic hafnia layers, the cell diameters can be adjusted from Equation or symbol description not available40to120nm controlled by the applied voltage and a tube/pore length of Equation or symbol description not available∼20μm can be reached.