The bremsstrahlung spectra produced by electrons impinging on thick targets are simulated using the Geant4 Monte Carlo toolkit. Simulations are validated against experimental data available in literature for a range of energy between 0.5 and 2.8 MeV for Al and Fe targets and for a value of energy of 70 keV for Al, Ag, W and Pb targets. All three independent sets of electromagnetic models available in Geant4 to simulate bremsstrahlung are tested. A quantitative analysis is performed reproducing with each model the energy spectrum for the different configurations of emission angles, energies and targets. At higher energies (0.5-2.8 MeV) of the impinging electrons on Al and Fe targets, Geant4 is able to reproduce the spectral shapes and the integral photon emission in the forward direction. The agreement is within 10-30%, depending on energy, emission angle and target material. The physics model based on the Penelope Monte Carlo code is in slightly better agreement with the measured data than the other two. However, all models over-estimate the photon emission in the backward hemisphere. For the lower energy study (70 keV), which includes higher-Z targets, all models systematically under-estimate the total photon yield, while still providing a reasonable agreement between 10 and 50%. The results of this work are of potential interest for medical physics applications, where knowledge of the energy spectra and angular distributions of photons is needed for accurate dose calculations with Monte Carlo and other fluence-based methods.