Put all ingredients of purée in a pot and cover. Boil it on medium heat for 30 minutes until tomatoes are soft and mushy.
Remove from heat and let it cool. Then blend it into a smooth puree. Strain the puree through a coarse strainer and set aside.
Boil vinegar with whole spices for few minutes and then remove spices.
Now combine tomato puree, sugar, salt, vinegar and red chilli in a pot.
Bring it to boil and simmer on medium to low heat for 15-25 minutes until sauce thickens and is reduced a little. The thick sauce will splutter so adjust heat as needed.
Fill hot tomato ketchup in sterilised jars and do not place the cap until sauce cools completely.