Caramelized Onion Mac and Cheese

title 1
Caramelized Onion Mac and Cheese
⏱️ cook time 55 minutes
🍽️ servings 6
⚡ Difficulty medium

intro

Rich, creamy baked mac and cheese loaded with slow-caramelized sweet onions, crispy golden breadcrumb topping, and sharp melty cheeses for ultimate cozy comfort.

Ingredients

Dry elbow macaroni 340g (12oz)
Large yellow onions 3 (approx 700g total)
Sharp white cheddar cheese 225g (8oz), block form
Gruyère cheese 115g (4oz), block form
Unsalted butter 7 tbsp (100g), divided
Whole milk 3 cups (720ml)
All-purpose flour 3 tbsp (25g)
Panko breadcrumbs 1/2 cup (30g)
Fresh thyme 2 tsp chopped, plus sprigs for garnish
Kosher salt 1.5 tsp, divided
Freshly ground black pepper 1/2 tsp
Extra-virgin olive oil 1 tbsp
Dijon mustard 1 tsp

Steps

1

Prep Base Ingredients

Place the acacia wood cutting board in the central work area. Use the 8-inch chef knife to halve, peel, and thinly slice the 3 yellow onions into uniform 1/4-inch half-moons. Use the 4-sided stainless steel box grater (large-hole side) to shred both the sharp white cheddar and Gruyère cheeses, piling shreds on the edge of the cutting board. Set aside 1/4 cup of the mixed shredded cheese for topping later. This prep takes approximately 15 minutes.

Step 1
step1:Prep Base Ingredients
Step 1
step1:Prep Base Ingredients
2

Caramelize Sweet Onions

Place the 10-inch beige enameled cast iron skillet on the stovetop over medium-low heat. Add 1 tbsp olive oil and 2 tbsp unsalted butter. Once butter melts, add all sliced onions and 1/2 tsp kosher salt. Stir to coat in fat, then cook, stirring every 3-4 minutes with the taupe silicone spatula, for 25-30 minutes until onions are deep golden amber, soft, and jammy with no crisp white bits remaining. If onions brown too quickly, reduce heat to low and add 1 tbsp water to deglaze the pan. Stir in 1 tsp chopped fresh thyme during the last 2 minutes of cooking, then scrape onions into a small dish and set aside.

Step 2
step2:Caramelize Sweet Onions
Step 2
step2:Caramelize Sweet Onions
3

Cook Pasta Al Dente

Fill the 5-quart stainless steel stock pot with 4 quarts of water, bring to a rolling boil over high heat, then add 1 tsp kosher salt. Add dry elbow macaroni and cook 1 minute less than package al dente instructions (approximately 7 minutes total), so pasta is firm to the bite with a tiny white core at the center. Reserve 1/2 cup starchy pasta water, then drain pasta completely in the stainless steel colander and set aside. Do not rinse pasta, as surface starch helps cheese sauce adhere.

Step 3
step3:Cook Pasta Al Dente
4

Make Cheese Sauce Base

Place the 2-quart stainless steel saucepan over medium heat. Add remaining 4 tbsp unsalted butter, and once melted, whisk in all-purpose flour with the stainless steel whisk to form a smooth roux. Cook roux for 2 minutes, stirring constantly, until it smells nutty and is pale golden, with no raw flour taste. Slowly pour in whole milk while whisking constantly to avoid lumps, then bring sauce to a gentle simmer, cooking 3-4 minutes until it thickens enough to coat the back of a spoon (a finger drawn through the sauce on the spoon leaves a clear line). Remove pan from heat, stir in Dijon mustard, remaining kosher salt, black pepper, and 3/4 of the shredded cheese, whisking until fully melted and smooth.

Step 4
step4:Make Cheese Sauce Base
Step 4
step4:Make Cheese Sauce Base
5

Mix Pasta and Onions

Add drained cooked elbow macaroni, all caramelized onions, and smooth cheese sauce to the clear tempered glass mixing bowl. Stir gently with the silicone spatula to fully coat every pasta noodle in sauce, adding 1-2 tbsp reserved pasta water as needed to thin sauce so it clings evenly without clumping. Ensure caramelized onions are evenly distributed, with no large clumps stuck together.

Step 5
step5:Mix Pasta and Onions
6

Assemble Baking Dish

Pour the fully mixed pasta and cheese sauce into the 9x13 inch matte white ceramic baking dish, spreading into a smooth even layer with the spatula. Top pasta evenly with the reserved 1/4 cup shredded cheese. In the small terracotta ramekin, mix panko breadcrumbs with 1 tbsp melted unsalted butter and remaining 1 tsp chopped thyme until crumbs are evenly coated, then sprinkle the buttered crumb mixture in a thin even layer over the cheese topping.

Step 6
step6:Assemble Baking Dish
7

Bake Until Bubbly

Place the assembled baking dish in a preheated 375°F (190°C) oven. Bake 20-25 minutes until cheese sauce bubbles vigorously around the dish edges, and the panko topping is deep golden brown and crispy. If the topping browns too quickly before sauce bubbles, tent the dish loosely with aluminum foil for remaining bake time. Remove from oven and let rest 5 minutes before serving to allow sauce to set slightly.

Step 7
step7:Bake Until Bubbly

Tips

1.Don’t rush onion caramelization: cooking over medium-low heat for 25+ minutes breaks down onion natural sugars into deep, sweet, complex flavor; high heat will burn edges and leave bitter, crisp bits instead of jammy, sweet strands.
2.Grate cheese from blocks instead of using pre-shredded cheese: pre-shredded cheese is coated in anti-caking potato starch that prevents smooth melting, leading to a grainy, separated cheese sauce.
3.Reserve 1/2 cup starchy pasta water before draining: the starchy water emulsifies with cheese sauce to create a silky, clingy coating on every noodle, instead of sauce that runs off and pools at the dish bottom.

✨ You May Also Like

Main Course
🍜 United Kingdom

A showstopping classic of tender seared beef, savory mushroom duxelles, and crisp prosciutto wrapped in flaky golden puff pastry, baked to juicy perfection.

⏱️ 2 hours 1Main Course ★ 4.7
Main Course
🍜 India

Tender charred marinated chicken simmered in a rich, spiced creamy tomato sauce, this iconic Anglo-Indian curry pairs perfectly with basmati rice or warm naan.

⏱️ 50 minuteMain Course ★ 4.6
Main Course
🍜 Thailand

Classic tangy, sweet, and savory Thai stir-fried rice noodles with shrimp, tofu, and crunchy garnishes, balancing all five core Thai flavor profiles.

⏱️ 30 minuteMain Course ★ 4.5
Main Course
🍜 United Kingdom

Crispy golden beer-battered cod and fluffy double-fried chips, served with tangy tartar sauce and malt vinegar: the timeless, beloved British pub comfort classic.

⏱️ 45 minuteMain Course ★ 4.7
Main Course
🍜 Mexico

Smoky, chile-marinated pork tacos with caramelized pineapple, fresh cilantro, and lime: a beloved classic Mexican street food perfect for casual summer gatherings.

⏱️ 1 hour 45Main Course ★ 4.8
Main Course
🍜 United States

Crunchy Fritos corn chips layered with savory beef chili and melted cheddar, topped with cool, zesty fixings for a beloved, cozy Tex-Mex comfort food.

⏱️ 35 minuteMain Course ★ 4.8

Caramelized Onion Mac and Cheese:Frequently Asked Questions

1.How long do I actually need to caramelize onions to get that sweet, deep flavor without burning them? ▾
Don’t rush this step! Slice your yellow onions thin, cook them low and slow over medium-low heat with a pat of unsalted butter for 35 to 45 minutes, stirring every 5 minutes. They’re done when they’re deep golden, soft, and jammy with no crisp raw edges. Cooking on high heat to save time will burn the edges and leave a bitter, off-flavor in your final dish.
2.Can I use pre-shredded store-bought cheese instead of shredding my own from blocks? ▾
I strongly recommend shredding your own sharp white cheddar and Gruyère from blocks for the creamiest results. Pre-shredded cheese is coated in anti-caking starch that prevents smooth melting, leading to a grainy sauce. If you’re in a total time crunch, you can use pre-shredded, but stir in a tiny splash of heavy cream while melting to help smooth the texture out.
3.Why does my breadcrumb topping turn out soggy instead of crispy and golden? ▾
Soggy breadcrumbs usually come from two easy-to-fix missteps: piling the topping on too thick, or using untoasted crumbs. Toss breadcrumbs with melted unsalted butter, toast them for 3 minutes in a dry skillet until pale gold, then spread them in a thin, even layer over the mac. Bake uncovered at 375°F so the top crisps instead of steaming under trapped moisture.
4.Can I make this caramelized onion mac and cheese ahead of time for a potluck or meal prep? ▾
Absolutely, this dish holds up beautifully for advance prep! Assemble the pasta and cheese sauce (hold the breadcrumb topping until right before baking) and store it covered in the fridge for up to 2 days. When you’re ready to bake, add the buttered toasted crumbs, and tack on 10 to 15 minutes of bake time to account for the cold starting temperature.
5.What can I substitute for Gruyère if I don’t have it on hand? ▾
No stress if you’re out of Gruyère! Its nutty, ultra-melty sweetness pairs perfectly with caramelized onions, but you can swap it for equal amounts of fontina, smoked gouda, or extra sharp white cheddar. Just skip crumbly cheeses like feta or soft fresh cheeses like burrata, since they won’t melt into the smooth, creamy sauce base this recipe needs.
6.Do I have to bake this mac and cheese, or can I make it as a stovetop version? ▾
You can absolutely make a quick stovetop version if you’re short on time! Make the cheese sauce, toss in cooked pasta and caramelized onions, and serve immediately—though you’ll miss that crispy breadcrumb top. For stovetop, keep the sauce a touch looser with a splash of starchy pasta water, since it won’t thicken further as it bakes in the oven.
7.How do I keep my cheese sauce from turning grainy or curdled? ▾
Grainy sauce almost always happens when cheese is added too quickly over too-high heat. Once you make your butter-flour roux, whisk in milk slowly until smooth, then take the pan completely off the heat before adding shredded cheese a handful at a time, stirring constantly. Never let the sauce boil after adding cheese, as that will curdle the dairy proteins and create grit.
8.What can I use if I don’t have elbow macaroni for this recipe? ▾
While dry elbow macaroni’s curved ridges are perfect for catching cheese sauce, you can swap it for any small, textured pasta shape that holds sauce well. Great picks include cavatappi, small shells, rotini, or campanelle. Just cook the pasta 1 to 2 minutes less than the package directions so it stays al dente and doesn’t turn mushy during baking.
9.Can I add extra mix-ins like bacon or veggies to this mac and cheese? ▾
This recipe is super customizable, so feel free to add mix-ins you love! Crispy crumbled bacon, roasted broccoli, sautéed mushrooms, or a pinch of red pepper flakes for heat all pair beautifully with sweet caramelized onions and sharp cheese. Just pat any cooked mix-ins dry first, so extra moisture doesn’t thin the sauce or make the breadcrumb topping soggy.

Comments (18)

2 days ago

OMG this caramelized onion mac and cheese is a total game changer! My two picky 7 and 9 year olds went back for seconds and didn’t even complain about onions. Made it for our Sunday family dinner and my husband asked if we can have it again next week. 10/10, worth every minute of cook time!

1 day ago

Wait did your kids really not notice the onions? My son picks out every tiny onion piece he sees, I’ve been scared to try this!

20 hours ago

If you dice the onions super fine before caramelizing, they melt right into the cheese sauce and are almost impossible to pick out! I’ve had tons of picky eater success with that trick.

1 week ago

Brought this to my neighborhood potluck last weekend and people were literally scraping the dish clean! The sweet caramelized onions cut through the rich cheese so perfectly, not heavy at all like regular boxed mac. Only note is I added a little extra crispy bacon on top, chef’s kiss.

6 days ago

Love the bacon addition! That salty crunch pairs so well with the sweet onions, I’ll have to add that as a variation tip on the recipe card. So glad it was a potluck hit!

3 days ago

I swapped the dairy for cashew cream and nutritional yeast to make this vegan, and it still slapped! The caramelized onions add so much depth that you don’t even miss the regular cheese. Great base recipe to tweak for dietary needs.

5 days ago

Wait as someone who can barely make ramen without burning it, I was nervous the difficulty said medium but this was actually doable? The caramelizing onions part took longer than I thought but it was so worth it. My roommates thought I ordered takeout lmao

4 days ago

How long did the onions take you? I kept turning the heat up too high last time I tried caramelizing and burned them to a crisp 😅

4 days ago

So proud of you for giving it a go! Low and slow is the key for onions—keep the heat on medium-low and stir every few minutes, it usually takes 20-25 minutes for them to get that deep golden sweet flavor. No high heat shortcuts!

2 weeks ago

SO good. I made this for my book club meeting and half the group asked for the recipe before they even finished their first bite. The only con is my house smelled like onions for two days after, totally worth it though.

1 week ago

Pro tip: light a vanilla candle while it cooks and crack a window! I made this last month and didn’t have the lingering onion smell at all.

yesterday

I thought 55 minutes was too long for a weeknight meal but I pre-caramelized the onions on Sunday during meal prep and this came together in 15 minutes on Tuesday night! Perfect hack for busy schedules. Will be adding this to my regular rotation.

30 minutes ago

Took a chance and used a mix of sharp white cheddar and gruyere instead of just regular cheddar, and holy cow it was amazing. The nuttiness from the gruyere pairs so well with the sweet onions. 10/10 will make again.

15 minutes ago

That gruyere swap is *chef’s kiss* — it’s one of my favorite combinations too! It adds such a wonderful savory depth that pairs perfectly with the caramelized onion sweetness.

1 week ago

Made this for our post-hike family dinner and even my super picky teen who only eats fast food said it was ‘bussin’. High praise coming from him! I topped mine with breadcrumbs toasted in butter for a little extra crunch, highly recommend.

6 days ago

The buttered breadcrumb topping is non-negotiable for me! I add a little paprika to mine for a tiny kick, so good.

5 days ago

Love that teen approval! The buttered breadcrumb topping is such a great call, I usually include it as an optional add-in but it sounds like I need to move it to the main recipe.

3 days ago

Smoked this on my pellet grill at 350 instead of baking it in the oven and let me tell you, that subtle smoke flavor with the caramelized onions? Absolute game day winner. My buddies were raving during the football watch party.

2 days ago

Oh that’s genius! What wood pellets did you use? I’m thinking hickory might be too strong, maybe apple?

2 hours ago

I’ve tried so many fancy mac and cheese recipes from NYC restaurants and this one is better than half of them. The balance of sweet, savory, cheesy is perfect, no weird grainy cheese sauce texture like a lot of recipes have. Will be making this for date night this weekend.

2 weeks ago

Wait I burned the onions first try because I got distracted scrolling TikTok lmao. Second time I set a timer to stir every 3 minutes and they came out perfect. This reheats so good for lunch all week, way better than the sad office cafeteria food.

12 days ago

How long does this stay good in the fridge? I want to make a big batch for work lunches next week!

11 days ago

It’ll stay good for up to 4 days in an airtight container in the fridge! Just add a tiny splash of milk when you reheat it to get the sauce creamy again. And same, I’ve burned so many onions from getting distracted by my phone, the timer trick is a lifesaver.

5 days ago

I’ve been making mac and cheese for my grandkids for 50 years and I have to say, adding caramelized onions is such a nice upgrade. It adds a depth of flavor I never would have thought to add. My oldest granddaughter asked for the recipe to take to college with her.

4 days ago

That means the world coming from someone who’s been making mac and cheese as long as you have! I hope your granddaughter loves making it at college, it’s such a cozy comfort food for late study nights.

just now

Added a little drizzle of hot sauce on top of my serving and it was chef’s kiss. The heat cuts through the richness perfectly. My whole family cleaned their plates, even the toddler who’s been going through a ‘no cheese’ phase lately. Win!

2 days ago

Was skeptical that onions belonged in mac and cheese but my wife begged me to make this and wow, I was wrong. The sweet caramelized flavor doesn’t taste like regular sharp onion at all, it just makes the cheese taste better. 10/10, eating my words (and a second helping).

1 day ago

Same! I hate raw onions and even cooked onions usually make me gag but caramelized onions are totally different, they get sweet and soft, no harsh bite at all. I was so shocked how much I loved this recipe too!

1 week ago

Used gluten-free elbow pasta and a gluten-free flour blend for the roux and you literally can’t tell the difference. So many mac and cheese recipes get gummy with GF pasta but this was perfectly creamy. Finally a good GF mac recipe that doesn’t suck!

6 days ago

What brand of GF pasta did you use? Mine always turns mushy no matter what I do!

5 days ago

So glad the GF swap worked for you! I always recommend cooking GF pasta 1 minute less than the package says for baked mac, it keeps it from getting mushy when it bakes in the cheese sauce.

yesterday

Made this for a third date last night and he asked if I wanted to be exclusive after dinner. Coincidence? Maybe. But this mac and cheese is so good it definitely didn’t hurt my chances. Served it with roasted broccoli and a crisp white wine, 10/10 date night meal.

20 hours ago

Congratulations! That’s the best recipe review I’ve gotten all week, that makes me so happy. This is such a perfect cozy date night meal, it feels special without being too fussy.

5 minutes ago

Kinda messed up the roux at first and it was lumpy so I blended it real quick with my immersion blender and no one noticed lol. Don’t stress if you mess up a step, this recipe is pretty forgiving even for messy cooks like me.

3 days ago

Made this for my kid’s soccer team end-of-season potluck and all the parents were asking for the recipe. I doubled the batch and there was zero left. The only thing I’ll do differently next time is make a triple batch because the kids devoured it before some of the parents got a serving!

2 days ago

I was at that potluck! Can confirm, that mac and cheese was the best thing there, I went back for a second scoop and it was already gone 😭

2 days ago

Oh that’s too funny! Tripling the batch for a crowd of hungry soccer players and parents is definitely a smart call, I can never make enough when I bring this to youth sports events either.