1. Heat broiler, with rack in top position. Place tomatoes, onion halves, jalapenos, and garlic in a single layer on a rimmed baking sheet.
2. Broil until vegetables are blistered and slightly softened, rotating sheet and flipping vegetables frequently, 6 to 8 minutes (garlic may need to be removed earlier if it is browning too quickly.)
3. Discard glaric skins. In a food processor, pulse garlic and vegetables until coarsely pureed. Add lime juice, season with salt and pepper, and pulse to combine.
4. Transfer salsa to a bowl and stir in cilantro.
Yields 3 cups. Refrigerate up to 3 days or freeze up to 3 months.
For green salsa, use 1 1/2 lbs tomatillos and omit lime juice.