Ketchup's origins are in Asia, where it was a fermented fish sauce called kętsiap. The sauce was made from fish entrails and soybeans, and was common in Southeast Asia in the 17th century.
British discovery
British sailors encountered kętsiap while trading in Southeast Asia and brought it back to Europe. The British experimented with making their own version of the sauce, and tried using mushrooms, fish, and beans instead of soybeans.
Tomato-based ketchup
The first tomato-based ketchup was invented in 1812 by American James Mease. Mease's recipe included alcohol and tomatoes, which he called the "love apple".
Bottled ketchup
The first bottled ketchups were sold about 25 years after Mease's invention.
Today, tomato ketchup is generally vegan because it's made from ingredients like tomatoes, vinegar, sugar, salt, herbs, and spices.