Wash and stem the small tomatoes or wash and halve the larger tomatoes. Place in a single layer in a 9×13″ baking dish.
Add the quartered onions and peeled garlic cloves and drizzle with olive oil and season with salt.
Roast at 425 for 30-40 minutes; for a thicker sauce, cook longer and stir occasionally to keep from burning. The tomatoes and onions will look wrinkled, roasted, and slightly charred.
Remove the pan from the oven and set on the counter to cool for 10-15 minutes.
Scoop the tomato mixture into the bowl of a blender or food processor; add the basil leaves. Puree until it reaches the desired consistency. Add the reserved juice and pulse until thoroughly combined. Check seasoning and add salt or pepper as needed..
Serve immediately as pasta or pizza sauce or freeze in plastic containers or bags for later use.
You can use any variety of tomatoes you like; hothouse, roma, beefsteak, cherry, or a mix. Larger tomatoes should be cut in half. For a thicker sauce, add 1-2 cans of tomato paste. If needed, add pasta water to thin to the desired consistency.