The cell parameters, electron localization function and density of states of pure and Zr-doped NaAlH4 and Na3AlH6 are investigated using plane-wave pseudo-potential method based on density functional theory. The results show that NaAlH4 and Na3AlH6 are insulators characterized by a band gap of 46 and 31 eV, respectively. The Al and H atoms form covalent bonds and the Na and H atoms form ionic bonds in NaAlH4 and Na3AlH6 When Zr replaces Na, the interaction between Zr and H is stronger than the primary Na—H bond, and the interaction between Al and H becomes weaker; when Zr replaces Al, the bond between Zr and H is weaker than the primary Al—H bond. Our calculations indicate that Zr-doped NaAlH4 and Na3AlH6 are more stable than that of the pure alanates, and the energy to remove H atom is significantly decreased.