Homemade ketchup is simple and much more flavorful than anything you can buy at the store. I use 4 tablespoons of sugar, but adjust the sugar to your taste.
1 tablespoon olive oil
1 medium onion, sliced into half moons
2 garlic cloves, chopped, about 1 tablespoon
1-inch piece of ginger, peeled and chopped
1/4 teaspoon to 1/2 teaspoon crushed red pepper flakes, optional for spicy ketchup
1/4 teaspoon ground allspice
2 tablespoons tomato paste
1 (28-ounce) can whole tomatoes in juice
2 to 5 tablespoons brown sugar, depending on how sweet you like your ketchup
1/4 cup apple cider vinegar
Salt and fresh ground black pepper
Heat oil over medium heat. Add the onions and cook until they are softened, sweet, and lightly browned, about 8 minutes. Add the garlic, ginger, red pepper flakes, and allspice and cook, stirring often, for 2 minutes.
Add the tomato paste and cook, stirring around the pan, until it turns red to burnt orange, about 2 minutes.
Add the can of tomatoes with juice, 2 tablespoons brown sugar, cider vinegar, a generous pinch of salt, and a few grinds of black pepper. Stir, and then taste to see if you need to add more sugar (we usually add 3 to 4 tablespoons).
Bring to a simmer, reduce the heat slightly and cook at a low simmer, stirring occasionally, until thickened and shiny, about 20 minutes. Taste then adjust with more sugar, salt or pepper.
Blend until smooth, let cool to room temperature, then refrigerate for up to one month.