The UV-visible Global Ozone Monitoring by Occultation of Stars (GOMOS) instrument onboard Envisat performs nighttime measurements of ozone, NO2, NO3 and of the aerosol extinction, using the stellar occultation method. We have conducted a validation exercise using various balloon-borne instruments in different geophysical conditions from 2002 to 2006, using GOMOS measurements performed with stars of different magnitudes. GOMOS and balloon-borne vertical columns in the middle stratosphere are in excellent agreement for ozone and NO2. Some discrepancies can appear between GOMOS and balloon-borne vertical profiles for the altitude and the amplitude of the concentration maximum. These discrepancies are randomly distributed, and no bias is detected. The accuracy of individual profiles in the middle stratosphere is 10% for ozone and 25% for NO2. On the other hand, the GOMOS NO3 retrieval is difficult and no direct validation can be conducted. The GOMOS aerosol content is also well estimated, but the wavelength dependence can be better estimated if the aerosol retrieval is performed only in the visible domain. We can conclude that the GOMOS operational retrieval algorithm works well and that GOMOS has fully respected its primary objective for the study of the trends of species in the middle stratosphere, using the profiles in a statistical manner. Some individual profiles can be partly inaccurate, in particular in the lower stratosphere. Improvements could be obtained by reprocessing some GOMOS transmissions in case of specific studies in the middle and lower stratosphere when using the individual profiles.