We fabricated a highly water-repellent quartz nanopillar (NP) structure to investigate the effect of varying the contact angle (CA) by using 10-nm-order gaps and 10-nm-diameter NPs. Gaps from 15 to 30 nm led to CAs of more than 100°, showing hydrophobicity, to a maximum of 105°. The mechanism of repelling water on quartz could be explained by the Cassie-Baxter model with a filling factor. A gap of more than 30 nm fills with water due to capillarity, but a gap of less than 30 nm causes water to be repelled by air. We were able to repeatedly fabricate a quartz NP structure with a controllable gap by using a combination of a bio-template and neutral-beam etching and found this structure to be highly water-repellent. The structure has high durability and optical transparency. As a result, we conclude that it can be used in sensors and lenses on various devices such as cameras and radars.