Sofrito is the heart of so many Latin American dishes, and every country gives it its own twist. In Costa Rica, we have our version too. No matter where you go, though, there are always four ingredients that show up: onions, peppers, garlic, and oil. From there, each region adds its own touch—different herbs, vegetables, and even ways to preserve it. Today, I’ll show you how we make it the Costa Rican way.

I’ve said it before in other posts—I’m not a food historian, so I can’t tell you for sure where sofrito first originated. What I do know is that the word comes from the Spanish verb sofreír, which means “to sauté.” And that part makes perfect sense: you start by sautéing the base of your dish to build flavor before adding the rest of your ingredients.
That’s the beauty of sofrito—it’s both traditional and practical. I love making a big batch of sofrito and keeping it in the fridge so it’s always ready when I need it. In some countries, people blend the ingredients raw and freeze them in ice cube trays, which works great too. But since the Costa Rican version is cooked, I like to prepare a large batch and then freeze what’s left. Honestly, I go through it so quickly—because I add it to almost every meal—that it rarely lasts long in my kitchen.
When to Use Sofrito
Sofrito is one of those kitchen staples that makes almost any dish better. In Costa Rican cooking, you’ll find it as the base for:
- Black Beans – it gives depth and flavor to this essential side dish.
- Gallo Pinto – the national breakfast wouldn’t be the same without it.
- Picadillos – from chayote to potatoes, sofrito ties it all together.
- Soups and Stews – a spoonful of sofrito builds layers of flavor right from the start.
- Rice Dishes – mix it in to transform plain rice into something special.

Ingredients for Costa Rican Sofrito
These are the ingredients I use to make my sofrito. I’ll also share a list of other ingredients you can add to make it your own.
🧅 Onion
A big ingredient in Latin cuisine. Honestly, the only dishes I don’t add onion to are the sweet ones—everything else includes cebolla in one form or another: raw, sautéed, or caramelized. In Costa Rican cooking, onion is a must, so of course it’s part of sofrito. It adds so much fragrance and delicious flavor to the dish.
🌶Bell Pepper
Another staple in Costa Rican cuisine. Back home, we use a type of pepper called chile dulce—it’s a bit longer and sweeter than bell peppers. Since I’m in the U.S., I use bell peppers because they’re easier to find. Don’t feel bad, though—bell peppers are amazing! I just want to point out that in Costa Rica, we don’t usually consume them as much, and they’re actually more expensive than regular chile dulce.
For this recipe, you can use green, yellow, purple—any type of pepper you find. I personally love using red bell pepper because it gives the sofrito such a beautiful red color (nothing weird about it 😅). But honestly, any pepper works just fine.
🧄 Garlic
What can I say? Garlic makes everything better. In Costa Rican cooking, it’s used all the time to boost flavor and aroma. For sofrito, I like to add plenty—because once it cooks down with the onion and peppers, it creates that irresistible smell that fills the whole kitchen. Don’t be afraid to use garlic! Remember, we’re not eating spoonfuls of sofrito on its own—we’re adding it to other dishes, and garlic is one of the most delicious aromatics you can use.
🧴 Oil
Oil is what actually gives sofrito its name—because you’re sautéing the vegetables. Technically, you could cook it without oil, just letting the vegetables release their own juices while stirring constantly so they don’t burn. But oil is like the glue that brings sofrito together. And since we only use a little bit, I’d say we’re safe to add it without guilt.
🥬 Celery
I believe celery is what really sets Costa Rican sofrito apart from other versions, since most don’t include it—but we do. Celery brings a fresh, slightly peppery flavor with a hint of earthiness that brightens the whole mix. It balances the sweetness of the onions and peppers and makes the sofrito taste even more complex.
Other Ingredients You Can Add
🍅 Tomatoes
Some versions of sofrito include tomatoes—you’ll even find store-bought sofrito made that way. Personally, I only add tomatoes when I know the final recipe will benefit from that flavor. Sometimes I make two batches: one with tomatoes and one without, so I can choose depending on what dish I’m cooking.
🌿 Oregano
Fresh or dried, oregano provides an amazing flavor that blends beautifully with the rest of the ingredients.
🌱 Culantro and/or Cilantro
These are two completely different herbs you can usually find at Latin or Asian markets. In Costa Rica, most people add them while cooking the sofrito. I prefer to add them at the very end of a recipe because that’s when they really shine. Cooking them too long can dull their bright, fresh flavor, but added at the end, they give the dish a fresh taste that stands out.

💡 Extra Tips for Making Costa Rican Sofrito
- Make it spicy: Add jalapeños, habaneros, or any other spicy peppers to give your sofrito more flavor and heat. Just be careful—add a little at a time since you don’t always know what the final dish will be.
- Use your food processor: Speed things up by pulsing your veggies a few seconds at a time, resting in between. If you let it run non-stop, you’ll end up with vegetable soup instead of a nicely chopped mix.
- Sauté until the liquid evaporates: Cook your veggies just until all the liquid is gone. You could caramelize them if you like, but that will completely change the flavor profile.
- Don’t add salt: Since you don’t know what dish you’ll be adding sofrito to, it’s always better to season at the end of the recipe.
- Freeze in portions: Once cooked, freeze sofrito in ice cube trays. That way, it’s pre-portioned and you won’t waste any by thawing more than you need.
- Adjust the texture: If you like a chunkier sofrito, chop your veggies by hand. For a smoother base, let the food processor run a little longer (just short of turning it into a paste).
- Play with herbs: Besides cilantro or culantro, try adding parsley, thyme, or bay leaves depending on the dish. Each one gives a unique twist.
- Cook a big batch: It takes the same effort to make a small or large batch, so cook plenty at once—you’ll thank yourself later when you always have some on hand.
Step-by-step photos
Pictures speak louder than words, so here’s a step-by-step with photos (and just a few words) to show you how to prepare Costa Rican Sofrito.

Step 1: Chop the onions.
Dice them into small, even pieces so they cook evenly.

Step 2: Prepare the other vegetables.
Chop the red bell peppers into small pieces and set aside. Repeat with the celery (and any other vegetables you decide to add).

Step 3: Start cooking the base.
In a large skillet or pan, add the chopped onions and red bell peppers. Set the heat to medium-high.

Step 4: Add celery and oil.
Mix in the celery and oil. Since adding these ingredients lowers the temperature, adjust the heat as needed. Cook for about 10 minutes.

Step 5: Let the liquid evaporate.
The vegetables will start releasing liquid. Don’t throw it away—keep cooking for another 10 minutes, or until all the liquid has evaporated.

Step 6: Finish with garlic.
Add the garlic and cook for no more than 2 minutes. Garlic turns bitter if overcooked, which is why we add it at the end.
💡 Frequently Asked Questions About Sofrito
It can last up to 2 weeks in an airtight container. If you haven’t used it after that, move it to the freezer, where it will last for about 2 months (sometimes even longer).
Yes, you can! You can also use any type of oil—vegetable, avocado, or even lard or bacon fat (yum!). The only one I don’t recommend is olive oil (regular or extra virgin), since sofrito cooks for a long time and olive oil doesn’t handle heat very well.
Not necessarily. You can chop and mix all your veggies raw, then freeze them to use later. But technically, that’s more like meal prep—still great, but it’s not sofrito until you sauté it.
Almost anything! Sofrito is the base for rice, beans, soups, stews, picadillos (a type of stew made with finely chopped vegetables), and honestly, any dish where you want a boost of flavor.
Absolutely! That’s actually how I prefer to make mine. I love the texture of hand-chopped vegetables—it gives the sofrito more body compared to using a food processor, which tends to make it too fine.
👌Why I Love Making Sofrito
We’ve already established that sofrito is the base for so many Latin recipes (including Costa Rican ones). Making it ahead of time not only saves you time, but also ensures you always have those key ingredients ready to go.
Think about it—how many times have you wanted to cook something delicious, but then remembered you’d have to chop onions (and cry for 2–3 minutes while doing it), then cook them down, and so on? Ugh! By the time you’ve thought it all through, you’ve already decided to skip cooking, grab takeout instead, and then regretted it because you know what you wanted to make would have been 100 times better. How many times has that happened?
With sofrito in your fridge, all you need to do is toss in a couple more ingredients and—boom—dinner is ready.
Did I mention the benefits of adding sofrito to your food—the depth of flavor it brings to every dish? Stop overthinking it and just go make yourself a batch of sofrito.
You can start using it right away in the following recipes (see what I did there? 😉)
Authentic Costa Rican Gallo Pinto
Costa Rican Black Beans
Yucca Flower Picadillo
…and lots more (but for now, these are the only recipes I have on the blog 🤣).
Besitos (kisses),
Mara
Costa Rican Sofrito
Equipment
- Cutting board and knife
- Food processor optional
- Large Pan and spatulas
Ingredients
- 2 medium onions
- 1 red bell pepper
- 2 celery sticks
- ¼ cup vegetable oil
- 5-7 garlic cloves
Instructions
- Prep the vegetables: Peel and chop the onions into small, even pieces; set aside. Rinse the peppers, slice them into strips, then cut into small cubes; set aside. Peel and finely chop the garlic; set aside. Rinse and chop the celery sticks into small pieces.
- Start cooking: In a large skillet or pan over medium-high heat, add the onions, celery, and bell peppers. Pour in the oil and cook for about 10 minutes, stirring occasionally.
- Cook down the liquid: The vegetables will start to release liquid. Do not discard it—continue cooking for another 10 minutes, or until the liquid has fully evaporated. Lower the heat if needed to prevent burning.
- Add the garlic and finish: Stir in the garlic and cook for no more than 2 minutes. Once your sofrito is fully cooked, remove from heat. Let it cool before storing if you’re saving it for later, or use it right away if needed.
Video
Notes
- You can add other ingredients like tomatoes, oregano, cilantro, or culantro if you like—adjust based on the dish you’re making.
- Store sofrito in the fridge for up to 2 weeks or freeze in ice cube trays for about 2 months.
- Any oil works (vegetable, avocado, lard, even bacon fat)—just avoid olive oil, since it doesn’t hold up well to long cooking.
- Use 2–3 tablespoons of sofrito as the base for rice, beans, soups, stews, and picadillos.
Leave a Reply