  We provide an overview of the design and capabilities of the near-infrared
spectrograph (NIRSpec) onboard the James Webb Space Telescope. NIRSpec is
designed to be capable of carrying out low-resolution ($R\!=30\!-330$) prism
spectroscopy over the wavelength range $0.6-5.3\!~\mu$m and higher resolution
($R\!=500\!-1340$ or $R\!=1320\!-3600$) grating spectroscopy over
$0.7-5.2\!~\mu$m, both in single-object mode employing any one of five fixed
slits, or a 3.1$\times$3.2 arcsec$^2$ integral field unit, or in multiobject
mode employing a novel programmable micro-shutter device covering a
3.6$\times$3.4~arcmin$^2$ field of view. The all-reflective optical chain of
NIRSpec and the performance of its different components are described, and some
of the trade-offs made in designing the instrument are touched upon. The
faint-end spectrophotometric sensitivity expected of NIRSpec, as well as its
dependency on the energetic particle environment that its two detector arrays
are likely to be subjected to in orbit are also discussed.
