The density functional theory was used to investigate lead-free tin- and germanium-based halide perovskites KMBr3 (M = Sn, Ge) under pressure (0 to 10 GPa). The structural, electronic, optical, and mechanical properties are inquired to determine their potentiality as future photovoltaic materials. The structure shows high accuracy in terms of lattice parameters, which goodly comply with previously reported data. The estimated band gap demonstrates the compounds' semiconducting nature at zero pressure condition. But the increment of pressure lowers the band gap, improving their conductivity. Furthermore, charge density differences between K-Br and Sn(Ge)-Br are used to determine whether the bonds are ionic or covalent. Besides, the bond length consistently decreases, resulting in stronger bonding under pressure. In addition, the optical functions are improved by pressure, suggesting that these materials could be used in multiple optoelectronic devices operating in the visible and ultraviolet spectrums. Furthermore, the hydrostatic pressure has a prominent effect on the mechanical properties while maintaining stability. The ductile natures as well as the anisotropic behavior get more intensive under applied pressure.