Abstract Onion oil and its components were tested for their nematicidal activity against the pine wood nematode, Bursaphelenchus xylophilus, with 96-well plate bioassays. Responses varied with test materials and concentration. Good nematicidal activity against male, female and juvenile nematodes of B. xylophilus was achieved with onion oil. The LC50 values of onion oil against male, female and juvenile pine wood nematodes were 17.6, 13.8 and 12.1 μg ml−1, respectively. Analysis by gas chromatography-mass spectrometry led to the identification of four major sulphur compounds: propyl disulphide, propyl trisulphide, methyl propyl disulphide and methyl propyl trisulphide. These four compounds and propyl sulphide and methyl propyl sulphide were tested individually for their nematicidal activities against pine wood nematode. LC50 values of propyl trisulphide and methyl propyl trisulphide against juvenile nematode were 5.0 and 22.9 μg ml−1, respectively. Other sulphur compounds showed weak activity.