Electrolysis of water is employed to produce surface nanobubbles on highly orientated pyrolytic graphite (HOPG) surfaces. Hydrogen (oxygen) nanobubbles are formed when the HOPG surface acts as a negative (positive) electrode. The coverage and volume of the nanobubbles increase with increasing voltage. The yield of hydrogen nanobubbles is much larger than the yield of oxygen nanobubbles. The growth of the individual nanobubbles during the electrolysis process is recorded in time with the help of AFM measurements and correlated with the total current. Both the size of the individual nanobubbles and the total current saturate typically after 1 min; then the nanobubbles are in a dynamic equilibrium, meaning that they do not further grow, in spite of ongoing gas production and nonzero current. The surface area of nanobubbles shows a good correlation with the nanobubble volume growth rate, suggesting that either the electrolytic gas emerges directly at the nanobubbles’ surface or it emerges at the electrode’s surface and then diffuses through the nanobubbles’ surface. Moreover, the experiments reveal that the time constants of the current and the aspect ratio of nanobubbles are the same under all conditions. Replacement of pure water by water containing a small amount of sodium chloride (0.01 M) allows for larger currents, but qualitatively gives the same results.