A theoretical study to investigate the electronic, optical and structural properties of sodium-based cubic fluoro-perovskite NaXF3 (where X = Sr, Zn), using density functional theory (DFT) based CASTEP (Cambridge Serial Total Energy Package) code with ultra-soft pseudo-potential USP plane wave and Perdew Burke Ernzerhof (PBE) exchange-correlation functional of Generalized Gradient Approximation (GGA), is reported. The findings show that both compounds are in a stable form with a cubic structure. The calculated elastic constants also meet the mechanical stability criteria. NaSrF3 is brittle, while NaZnF3 is ductile, according to Pugh's criteria. The electronic band structure calculations reveal that NaSrF3 has a direct and NaZnF3 has an indirect band gap. The finding of band gap is agreed well with the data that is already available. The degree of localized electrons in different bands is confirmed by partial density of states (PDOS) and total density of states (TDOS). By fitting the dispersion relation for the hypothetical dielectric function scale to the corresponding peaks, the optical transitions in both compounds were investigated. Both materials are insulators at 0 K and semiconductor at high temperature. However, the dielectric function's imaginary component dispersion exposes its broad range of energy transparency. As a result, it can be inferred that these materials could be used to capture the ultraviolet region in optoelectronics.