The development of a suitable negative ion source constitutes a crucial step in the construction of the neutral beam injector of ITER. To fulfil the ITER requirements in terms of heating and current drive, the negative ion source should deliver 40 A of D−. The achievement of such a source constitutes a technical and scientific challenge, and it requires a deeper understanding of the underlying physics of the source. The present knowledge of the ion extraction mechanism from the negative ion source is limited. It constitutes a complex problem that involves understanding the behaviour of magnetized plasma sheaths when negative ions and electrons are pulled out from the plasma. Moreover, due to the asymmetry induced by the crossed magnetic configuration used to filter the electrons, any realistic study of this problem must consider the three spatial dimensions. To address this problem in a realistic way, a 3D particles-in-cell electrostatic code specifically designed for this system was developed. The code uses a Cartesian coordinate system and it can deal with complex boundary geometry as it is the case of the extraction apertures (Hemsworth et al2009 Nucl. Fusion49 045006). The complex magnetic field that is applied to deflect electrons is also taken into account. This code, called ONIX, was used to investigate the plasma properties and the transport of negative ions and electrons close to a source extraction aperture. Results in the collisionless approach on the formation of the plasma meniscus and the screening of the extraction field by the plasma are presented here, as well as negative ions trajectories. Negative ion extraction efficiency from volume and surfaces is discussed.