The condition, which is most common in children under the age of five and can lead to blood poisoning and brain damage, is normally diagnosed through a painful lumbar puncture.
It is treated with broad-spectrum antibiotics but these can attack good bacteria in the body too. The technique, which has been developed by experts at Strathclyde University, uses laser beams fired at a sample of spinal fluid which has been mixed with silver nanoparticles.
Scientists can then analyse the scattered light, allowing them to diagnose more than one disease-causing agent at a time.
Details of the test have been published in Chemical Science journal.