Perovskite-type hydrides are promising candidates for solid-state hydrogen storage due to their high hydrogen content and structural flexibility. In this study, the structural, electronic, mechanical and hydrogen storage properties of the cubic hydrides NaPH \(_6\) and KPH \(_6\) were investigated using density functional theory (DFT) combined with ab initio molecular dynamics (AIMD) simulations. The optimized structures satisfy the Goldschmidt tolerance factor and octahedral factor criteria, confirming their geometric stability. Thermodynamic, mechanical, and phonon analyses further indicate that both compounds are stable. The calculated gravimetric hydrogen capacities are 10.08 wt% for NaPH \(_6\) and 7.95 wt% for KPH \(_6\) , with corresponding volumetric densities of 131 and 111 g H \(_2\) /L, respectively, exceeding the DOE 2025 targets. The estimated desorption temperatures (453–463 K) suggest suitability for off-board hydrogen storage applications. Electronic structure calculations reveal semiconducting behavior, with NaPH \(_6\) exhibiting a direct band gap of 1.01 eV and KPH \(_6\) an indirect band gap of 1.76 eV, which increase to 2.24 eV and 2.90 eV, respectively, when using the HSE06 functional. Optical properties indicate strong absorption in the ultraviolet region. These findings demonstrate that NaPH \(_6\) and KPH \(_6\) are structurally stable hydride perovskites with high hydrogen storage capacity and promising potential for energy-related applications.