In this work, we have conducted an ab initio computational research of the pressure impact on the structural, elastic, thermodynamic, electronic, and optical properties of Be-based fluoroperovskite XBeF3 (X= K, Rb) compounds by using GGA+ PBEsol functional based on DFT in the CASTEP Package. These compounds' ground state characteristics were examined, including the lattice parameters, coefficient compressibility (B), and its pressure derivative(B’). Structural characterization shows that these compounds keep a cubic crystal structure with the impact of stress till 18 GPa. In addition, we computed elastic constants, Young’s modulus (E), shear modulus (G), Poisson’s ratio (σ), and the anisotropy factor (A). As the elastic stiffness parameters comply with the Born stability criterion, the examined phases are mechanically stable. The ductility of phases XBeF3 (X= K, Rb) has been assured from the high coefficient compressibility (B) and Pugh’s ratio values. Furthermore, we determined the thermodynamic behavior of XBeF3 (X= K, Rb) through the quasi-harmonic Debye model. The electronic band structure and DOS (Density of States) were studied, which provide information on the insulator properties of the two compounds. Also, we studied various optical properties of the materials including: refractive index, optical reflectivity, coefficient of absorption, both real and imaginary parts of dielectric function and lastly the energy loss function. On the basis of these reported studies of these materials, their applications in many modern electronic devices can be predicted.