Wash and dry all equipment. Wash off and dry tomatoes and basil if using.
Place empty jar on scale and zero it out. (You will be calculating the weight of the tomatoes plus the water.)
Place the tomatoes, basil, garlic, and any spices in the jar. Leave a couple of inches of headroom. Add water to the jar, leaving enough headroom for a glass weight, or whatever you will be using to keep the vegetables submerged.
Record the weight in grams and multiply it by .025. The result is the amount of salt you will need.
Pour off the water into a bowl or measuring cup. Place a small bowl on the scale and zero it out. Add the amount of salt you calculated earlier. Add that salt to the water and stir to dissolve.
Pour the salted water (brine) back over the tomatoes in the jar. Place a weight, a cabbage leaf, or whatever you are using to keep the vegetables submerged. Place a lid on the jar, either a fermenting lid or a regular lid. If using a regular lid, you'll need to open it a bit every day or so to let gases escape.
Place the jar on a plate, keep out of direct sunlight. Taste your tomatoes in 6-8 days. When they are to your liking, you can replace the fermenting lid with a regular lid and store in the fridge.