By using the DFT approach within the generalized gradient approximation (GGA) adopted in the Wien2k code, the effects of pressure on the structural, electrical and optical characteristics of XZnF3 (X= Na, K and Rb) halide perovskites have been investigated. In the present paper, the unit cell structures of XZnF3 (X= Na, K and Rb) have been optimized. Within the present approximation, the analysis showed indirect bandgaps of those compounds. At 0GPa, the density of states (DOS) besides band structures predicted the bandgaps of (2.80, 3.84 and 4.22eV) connected to (NaZnF3, KZnF3 and RbZnF3), respectively. These indirect bandgaps increase from (0 to 20GPa) with hydrostatic pressure. Regarding the optical properties, the imaginary part epsilon 2(omega) of the dielectric function, the absorption alpha(omega), the reflectivity R(omega) and the refractive index n(omega) are determined. The light absorption at the surface begins at critical points corresponding to the threshold energy, their values of (5.00, 5.20 and 5.30eV at 0GPa) and (5.90, 6.30 and 6.50eV at 20GPa) related to NaZnF3, KZnF3 and RbZnF3, respectively. The pressure induced in XZnF3 (X= Na, K and Rb) reduces absorption intensity to a remarkable extent, both in the visible and ultraviolet range and the intensity of the reflectivity spectra decreases with increasing pressure. When there is no induced pressure, optical conductivity starts out with lower photon energies and increases as pressure builds up, reaching greater photon energies at pressures of up to 20GPa. The mechanical stability of the material studied is verified using the Born stability criteria, the values obtained for the elastic constants verify the stability conditions of XZnF3(X= Na, K and Rb), improving with applied pressure 0 up to 20GPa. NaZnF3 and KZnF3 have slightly higher ductility than RbZnF3 at 0GPa, and KZnF3 has a slightly higher ductility than NaZnF(3 )at 0GPa, and higher than RbZnF3 at 20GPa. Also, the mechanical stability is verified using the Born stability criteria, where the elastic constants verify the stability conditions. The Cauchy pressure value of XZnF3 (X= Na, K and Rb) perovskite under all the pressures studied is positive, indicating that the ductile nature of perovskite improves and increases with increasing pressure.