Cement is an important part in oil and gas well completion. A high quality of cement is required to seal hydraulic pressure between casing and borehole formation. Cement additives were used to enhance the cement properties such as thickening time, compressive strength, porosity and permeability of the cement. Currently, the commercial additives were imported and the price is keep increasing year by year. Therefore, the researchers were continuously looking for potential additives such as nanoparticle to improve the cement properties. This paper presents the effect nanosilica on compressive strength and porosity of oil well cement type G. In this study, two type of nanosilica were used, synthesis nanosilica from rice husk ash (RHA) and commercial nanosilica. The synthesized nanosilica was characterized using fourier transform infrared spectroscopy (FTIR), X-ray flouresece (XRF) and Field Emission Scanning Electron Microscopy (FESEM). All the experiments were conducted using API standard procedures and specifications. Based on the results, compressive strength of cement slurries was improved from 2600 psi to 2800 psi for 8-hours curing, when the amount of nanosilica increased from 0 wt% to 1.5 wt%. Besides that, incorporation of nanosilica from RHA into cement formulation resulted in reduction of cement porosity up to 18 % pore volume. Overall, the results showed that the incorporation of nanosilica from RHA improved the oil well cement compressive strength and oil well cement porosity. In conclusion, green nanosilica from RHA can be a potential candidate to replace the commercial nanosilica to enhance the oil well cement properties as well as to prevent the migration of undesirable fluid which can lead to major blowout.