Homemade ketchup is rich in water and sugar, which is prone to harbor bacteria and therefore has a relatively short shelf life. Without added preservatives, it is generally recommended to store homemade ketchup in the refrigerator and consume it within 3-5 days to keep the food fresh and safe. If you need to store it for a longer period of time, consider freezing it, but be careful to process the ketchup until it is sterile before freezing.
To ensure the safety of homemade ketchup, it is recommended that you use a clean container to store the prepared ketchup and cool it down quickly once closed. When consuming it, smell it first for any off-flavors or signs of spoilage, and discard it immediately if anything unusual is found. It is also not recommended to reheat already processed ketchup to avoid destroying the nutrients and flavor.