Context. Experiments that try to observe the 21-cm redshifted signals from the Epoch of Reionization using interferometric lowfrequency instruments have stringent requirements on the processing accuracy. Aims. We analyse the accuracy of radio interferometric gridding of visibilities with the aim to quantify the power spectrum bias caused by gridding, ultimately to determine the suitability of different imaging algorithms and gridding settings for 21-cm power spectrum analysis. Methods. We simulate realistic Low-Frequency Array (LOFAR) data, and construct power spectra with convolutional gridding and w-stacking, w-projection, image domain gridding and without w-correction. These are compared against directly Fourier transformed data. The influence of oversampling, kernel size, w-quantization, kernel windowing function and image padding are quantified. The gridding excess power is measured with a foreground subtraction strategy, for which foregrounds have been subtracted using Gaussian progress regression, as well as with a foreground avoidance strategy. Results. Constructing a power spectrum that has a bias significantly lower compared to the expected EoR signals is possible with the tested methods, but requires a kernel oversampling factor of at least 4000 and, when using w-correction, at least 500 w-quantization levels. These values are higher than typical values used for imaging, but are computationally feasible. The kernel size and padding factor parameters are less crucial. Among the tested methods, image domain gridding shows the highest accuracy with the lowest imaging time.Conclusions. LOFAR 21-cm power spectrum results are not affected by gridding. Image domain gridding is overall the most suitable algorithm for 21-cm Epoch of Reionization power spectrum experiments, including for future Square Kilometre Array (SKA) EoR analyses. Nevertheless, convolutional gridding with tuned parameters results in sufficient accuracy for interferometric 21-cm Epoch of Reionization experiments. This holds also for w-stacking for wide-field imaging. The w-projection algorithm is less suitable because of the kernel oversampling requirements, and a faceting approach is unsuitable due to the resulting spatial discontinuities.