In addition, raw onions are known as carminatives, a class of foods rich in volatile oils that includes peppermint and garlic, and that can produce heartburn symptoms in many people. It is also possible that raw onions cause an increase in gastric secretions, which could cause heartburn symptoms.