If you're a fan of onions, then you'll have tried all kinds of tricks to stop your eyes from watering when you cut them.

Putting a spoon in your mouth and plonking the onion in water have all been tried and tested, but have you ever wondering why they actually make you cry?

Well, Dr Robert Rosa Jr spoke to Web MD and said that when onions are growing in the ground, they release a gas full of amino acid sulfoxides to deter critters from eating them.

So, when they onions are cut opened, they release the sulfoxides and enzymes, which create a gas called syn-propanethial-S-oxide, and that is what makes you tear up.

Image result for crying from onions spongebobgif

"It really is a complicated chemical process that creates the gas," said Dr Rosa.

"They all act as precursors that create the lachrymatory processor — or what makes you tear up.

"Your eyes have a set of nerves that detect anything that's potentially harmful to your eyes. Your eyes react to the gas that is formed, and your eyes try to flush it out with tears."

White, yellow and red onions are the main culprits as they release the strongest gas. Sweet onions, green onions and scallions have lower concentrations, which don't make your eyes water as much.

Close-up of Vegetables

Robert warns that everybody is different, and some are more sensitive to the gas than others.

However, onions pose no threat to your vision or eye health.

"Chopping onions can cause some burning and irritation and tears. Other than that, it's pretty safe on your eyes. It's a temporary sensation with no known long-term effects, nor will it worsen any other conditions, like pink eye."

And to stop it? "I'd personally recommend using eye drops, like comfort drops, to help lubricate or rinse the eyes and dilute the gas exposure to the eyes," Dr Rosa said.