Context. The steep temperature and density gradients that are measured in the coronal transition region challenge the model interpretation of observations. Aims. We derive the average electron density n e in the region emitting the S vi lines. We use two different techniques, which allow us to derive linearly-weighted (opacity method) and quadratically-weighted (emission measure method) electron density along the line-of-sight, to estimate a filling factor or derive the layer thickness at the formation temperature of the lines.Methods. We analyze SoHO/SUMER spectroscopic observations of the S vi lines, using the center-to-limb variations in radiance, the center-to-limb ratios of radiance and line width, and the radiance ratio of the 93.3−94.4 nm doublet to derive the opacity. We also use the emission measure derived from radiance at disk center.Results. We derive an opacity τ 0 at S vi 93.3 nm line center of the order of 0.05. The resulting average electron density n e , under simple assumptions concerning the emitting layer, is 2.4 × 10 16 m −3 at T = 2 × 10 5 K. This value is higher than (and inconsistent with) the values obtained from radiance measurements (2 × 10 15 m −3 ). The last value corresponds to an electron pressure of 10 −2 Pa. Conversely, taking a classical value for the density leads to a too high value of the thickness of the emitting layer. Conclusions. The pressure derived from the emission measure method compares well with previous determinations. It implies a low opacity of between 5 × 10 −3 and 10 −2 . It remains unexplained why a direct derivation leads to a much higher opacity, despite tentative modeling of observational biases. Further measurements in S vi and other lines emitted at a similar temperature should be completed, and more realistic models of the transition region need to be used.