1680s, also spelled catsup which form first appeared in Jonathan Swift's 1730 poem A Panegyrick on the D--n. This spelling is still in use in U.S., influenced by cat and sup.
In some of the earliest uses described as an East Indian sauce made with fruits and spices, with spelling catchup. If this stated origin is correct, it might be from Tulu kajipu, meaning "curry" and said to derive from kaje, "to chew." Yet the word, usually spelled ketchup, is also described in early use as something resembling anchovies or soy sauce. It is said in modern sources to be from Malay (Austronesian) kichap, a fish sauce, possibly from Chinese koechiap "brine of fish," which, if correct, perhaps is from the Chinese community in northern Vietnam [Terrien de Lacouperie, in "Babylonian and Oriental Record," 1889, 1890].
Lockyer's 1711 book "An Account of Trade in India" says: "Soy comes in Tubs from Jappan, and the best Ketchup from Tonqueen [Vietnam]; yet good of both sorts, are made and sold very cheap in China." This suggests that the English were buying in India sauces, which they called ketchup, that were imported from elsewhere and possibly were not all of a single national recipe.
The prepared ingredient appears in English cookbooks by the 1680s; by the 1720s a homemade sauce of mushrooms was made in imitation of it. "Apicius Redivivus; or, the Cook's Oracle," by William Kitchiner, London, 1817, devotes 7 pages to recipes for different types of catsup (his book has 1 spelling of ketchup, 72 of catsup), including walnut, mushroom, oyster, cockle and mussel, tomata, white (vinegar and anchovies figure in it), cucumber, and pudding catsup. Chambers's Encyclopaedia (1870) lists mushroom, walnut, and tomato ketchup as "the three most esteemed kinds." Tomato ketchup emerged c. 1800 in U.S. and predominated from early 20c. The word ketchup alone, meaning "tomato ketchup," was in use by 1921.