The bonding between glass and other materials plays a crucial role when glass is used in industrial products. In this study, we propose a new approach to enhance the bonding strength of glass with other materials by fabricating nanoscale porous structures on glass surfaces via a chemical reaction with hydrogen fluoride gas. Herein, we present a methodology for controlling the thickness of the porous structure, clarify the relationship between the thickness and adhesion strength, investigate the shape of the formed porous structure, and propose a method to control its shape. Our findings reveal that the fabricated porous structure greatly improves the adhesion strength of the adhesive owing to the microscopic anchoring effect induced by the penetration of the adhesive into the porous structure. This approach is expected to be applied to architectural and automobile window glasses, solar panels, sensor cover glasses of autonomous vehicles, display devices (including smartphones), and wearable devices.