Appetizers
This baked macaroni and cheese recipe from scratch delivers the ultimate comfort food experience—crispy golden edges, pull-apart cheese rivers, and a creamy sauce that clings to every noodle.
The secret lies in a perfectly balanced roux and a blend of sharp cheddar, Gruyère, and cream cheese that creates a sauce so rich it practically melts in your mouth.
After years of perfecting the technique, I can confidently say this is the only mac and cheese recipe you'll ever need.
What sets this recipe apart is the foolproof method that ensures a creamy, velvety sauce without lumps or separation, even after baking. We start with al dente pasta, then build the cheese sauce from scratch using a classic roux technique that develops deep, nutty flavors.
The baking process transforms the top into a crispy, golden crust while keeping the interior tender and gooey—no soggy bottoms here.
The result is a dish that looks as impressive as it tastes, with those signature cheese rivers that pull apart dramatically when you cut into it. Each bite delivers perfect texture contrast: crispy edges, creamy filling, and a rich, cheesy flavor that's impossible to resist.
This recipe serves as a restaurant-quality main dish or hearty side that will disappear faster than you can say "comfort food."
Pair it with roasted vegetables, a simple green salad, or even steamed broccoli to round out the meal. The leftovers reheat beautifully, making this an excellent option for meal prep—just add a splash of milk to restore creaminess. Ready to master the ultimate baked mac and cheese? Let's get started.
Ingredients for baked macaroni and cheese recipe from scratch
Six servings of restaurant-quality comfort—crispy edges, gooey rivers, and that perfect cheesy pull.
| Ingredient | Amount | Notes |
|---|---|---|
| Elbow Macaroni 🍝 | 1 ½ lbs | Al dente, dried preferred |
| Unsalted Butter 🧈 | ¾ cup | Cold, cut into small cubes |
| All-Purpose Flour 🌾 | ½ cup | Sifted for smooth roux |
| Sharp White Cheddar Cheese 🧀 | 2 cups | Shredded, block preferred |
| Gruyère Cheese 🧀 | 1 cup | Shredded, aged 12+ months |
| Cream Cheese 🧀 | 8 oz | Full-fat, room temperature |
| Whole Milk 🥛 | 2 cups | Warmed slightly |
| Heavy Cream 🥛 | ½ cup | Full-fat for richness |
| Yellow Onion 🧅 | 1 whole | Diced, sweet variety |
| Garlic Cloves 🧄 | 4 cloves | Minced, fresh preferred |
| Dijon Mustard 🍯 | 1 tbsp | For depth of flavor |
| Kosher Salt 🧂 | 1 ½ tsp | Diamond Crystal preferred |
| Ground Black Pepper 🌶️ | ½ tsp | Freshly cracked |
| Nutmeg 🌿 | ¼ tsp | Freshly grated |
| Panko Breadcrumbs 🍞 | ¼ cup | For crispy topping |
The cheese trio is non-negotiable. Gruyère brings nutty depth, sharp cheddar adds tang, and cream cheese binds everything together. I always grab block cheeses from the deli counter—the pre-shredded stuff has anti-caking agents that ruin texture. For Gruyère, Whole Foods or local cheese shops have the best aged wheels. The cream cheese? Philadelphia Original is my go-to—full-fat makes all the difference. Pro tip: grate your own cheddar using the large holes on a box grater for even melting.
No Gruyère? Comté or Emmental work in a pinch, but Gruyère's melt is unmatched. Short on sharp cheddar? Pepper Jack at half the amount adds heat. The panko topping can be swapped for crushed cornflakes or breadcrumbs, but panko stays crispier. For the roux, butter must be cold—if it melts too fast, you'll get a flat flavor. The onion and garlic are flavor foundations, so don't skip them. Fresh nutmeg is ideal, but ground works at double the amount—just toast it in the dry pan for 30 seconds to wake up the flavor.
This reheats like a dream—just cover with foil and warm at 350°F for 10-15 minutes. The leftovers taste even better the next day as the flavors meld. Store in an airtight container for 4-5 days in the fridge. For meal prep, assemble the dish without baking, then refrigerate the unbaked casserole for up to 24 hours before baking. The unbaked version keeps 3 days in the fridge too. Freezing? Bake first, then portion into containers—keeps for 3 months with a crispy texture restored by broiling for 2 minutes after reheating.
Why You'll Love This Recipe
- No-Fuss Stovetop Start: I swear by the roux—just butter, flour, and a little patience—then the cheeses melt right in. No fancy gadgets, no stress.
- Cheese Love Bomb: Sharp cheddar and Gruyère? That’s the dynamic duo. The cheddar’s tang cuts through the Gruyère’s nutty richness—like a hug in sauce form.
- Lunchbox Magic: Make a big batch on Sunday, and you’ve got weeknight lunches covered. The baked texture holds up, and kids (or adults) will eat it cold or reheated.
- Budget Baked Bliss: Pasta, butter, and cheese—basic, affordable, and always satisfying. It’s the kind of meal that stretches a grocery budget without feeling cheap.
Step-by-step instructions for crispy-topped macaroni and cheese
Here's how to create the ultimate baked mac and cheese with a golden, crackly crust and gooey, pull-apart rivers of cheese.
Cook the Elbow Macaroni to Al Dente Perfection
Bring a large pot of salted water to a rolling boil—it should taste like the ocean when you dip your finger in. Add the 1.5 lbs elbow macaroni and cook until 1 minute before the package suggests for al dente. This ensures it finishes cooking in the oven without turning mushy. Reserve 1 cup of the starchy pasta water before draining—this liquid is pure gold for creating a silky sauce later.
Drain the pasta and immediately return it to the pot. Toss with 1 tablespoon Dijon mustard and 1.5 teaspoons kosher salt while still hot. This step infuses flavor directly into the pasta, giving your dish depth from the start. The mustard also helps emulsify the cheese sauce later, preventing separation. Let it cool slightly before mixing with the cheese.
Build the Ultimate Cheese Sauce from Scratch
In a large Dutch oven over medium heat, melt the 0.75 cup unsalted butter until foamy. Whisk in the 0.5 cup all-purpose flour and cook for 2-3 minutes until the mixture forms a smooth, pale roux with no raw flour taste. This is your sauce foundation—don't rush this step or you'll end up with a floury, grainy texture.
Gradually whisk in the 2 cups whole milk and 0.5 cup heavy cream, adding about ½ cup at a time while whisking constantly to prevent lumps. Bring the mixture to a gentle simmer and cook for 5-7 minutes until it thickens enough to coat the back of a spoon. This is your velouté base—it should be silky smooth now, ready for the cheese transformation.
Add the Cheese and Aromatics for Maximum Flavor
Reduce heat to low and begin adding the cheeses in stages. First, stir in the 8 oz cream cheese until completely melted and smooth. Then add the 2 cups sharp white cheddar cheese and 1 cup gruyère cheese, whisking constantly until fully incorporated. The mixture will thicken dramatically—this is normal and exactly what we want.
In a separate small pan, sauté the 1 whole yellow onion and 4 cloves garlic in 1 tablespoon butter until soft and fragrant (3-4 minutes). Add this aromatic mixture to the cheese sauce along with 0.5 teaspoon ground black pepper and 0.25 teaspoon nutmeg. The nutmeg adds warmth that perfectly complements the sharp cheddar and nutty gruyère. Taste and adjust seasoning—you want it rich but not overwhelming.
Combine Pasta and Cheese for Maximum Cheesiness
Add the cooked macaroni to the cheese sauce and stir gently but thoroughly to distribute the sauce evenly. The pasta should be fully coated with that gorgeous, stretchy cheese mixture. If it's too thick (which it might be), whisk in ¼ cup to ½ cup of the reserved pasta water until you reach a consistency where the sauce clings to the pasta but still flows slightly when stirred.
Transfer the entire macaroni and cheese mixture to a 9x13-inch baking dish, spreading it evenly. The dish should be about ¾ full—this allows room for the cheese to expand and create those signature pull-apart rivers. Here's where the magic happens: sprinkle the 0.25 cup panko breadcrumbs evenly over the top for that coveted crispy crust.
Bake to Golden Perfection and Develop the Crispy Top
Preheat your oven to 375°F while you prepare the macaroni and cheese. Bake uncovered for 25-30 minutes until the edges are bubbling and the top is deep golden brown with crispy spots. The cheese should be melting dramatically, creating those beautiful rivers that make this dish so satisfying.
For the final touch, broil for 1-2 minutes at the very end—watch it closely! You want the top to turn golden brown and develop crispy spots while the cheese underneath stays creamy. Remove from the oven immediately when you see those perfect browned patches. Let it rest for 5-10 minutes before serving—this allows the cheese to set slightly and makes the first bite even more spectacular.
Pro Tips For Making Baked Macaroni And Cheese Recipe From Scratch
- USE LOW AND SLOW HEAT: I learned this the hard way—blasting the oven at 400°F makes the top burn before the center melts. Start at 350°F and let it cook for 25-30 minutes, checking at 20. The cheese needs time to emulsify properly, not just brown.
- GRATE CHEESE FINE: Pre-shredded cheese has anti-caking agents that make it grainy when melted. Use a box grater for both cheddar and Gruyère—it blends smoother and melts into a velvety sauce instead of clumping. (Yes, even if it takes 10 minutes.)
- DON’T SKIP THE PASTEURIZED MILK: Store-bought milk can curdle the roux, turning your sauce grainy. Heat 1 cup of milk in a separate saucepan until it’s steaming (not boiling) before whisking it into the butter-flour mix. This keeps the sauce silky.
- TOAST THE MACARONI: Drain the cooked pasta, toss it with 1 tablespoon of melted butter, and spread it on a baking sheet to dry slightly. This prevents a soggy bottom—your baked mac and cheese will hold its shape better and develop a crispier crust. (I know, it’s an extra step, but it’s worth it.)
Creative variations of this dish
Spicy Cajun Twist
Transform this classic into a Cajun-inspired masterpiece by adding 1 tablespoon Cajun seasoning (like Tony Chachere's) and ½ teaspoon smoked paprika to the cheese sauce. For extra heat, fold in ½ cup cooked andouille sausage, crumbled, after combining the pasta and cheese.
Top with extra panko mixed with 1 teaspoon cayenne pepper before baking. Serve with a side of cooling buttermilk biscuits to balance the heat. 🌶️
Luxury Truffle Upgrade
Elevate your mac and cheese to gourmet status by adding 1 tablespoon white truffle oil to the cheese sauce and topping with ½ cup shaved Parmesan and toasted pine nuts. For a showstopper, drizzle truffle-infused olive oil over the top after baking.
Pair with arugula salad dressed in lemon vinaigrette for a restaurant-worthy dish. The truffle adds an earthy depth that complements the cheesy richness perfectly. ✨
Breakfast Mac and Cheese
Turn this into a breakfast sensation by adding 2 cups cooked breakfast sausage (like Johnsonville) and 1 cup cooked hash browns to the pasta mixture. Stir in ½ cup sour cream and 1 tablespoon hot sauce after combining everything.
Top with crumbled bacon bits and extra panko before baking. Serve with scrambled eggs on the side for a hearty brunch. The crispy top contrasts beautifully with the creamy, savory filling. 🍳
Vegetarian Stuffed Shells
Swap the macaroni for 1.5 lbs jumbo pasta shells and use ricotta cheese instead of cream cheese in the sauce. Add 1 cup sautéed mushrooms and 1 cup spinach to the cheese mixture.
Stuff the shells with the cheese filling, then bake in a 9x13-inch dish with marinara sauce on top. Sprinkle with mozzarella and Parmesan before baking at 375°F for 25 minutes. The result is a cheesy, saucy, vegetarian-friendly twist that's perfect for dinner parties. 🥗
Buffalo Chicken Fusion
Add 1.5 cups shredded buffalo chicken (poach chicken in ½ cup hot sauce and shred) to the pasta mixture. Stir in ½ cup ranch dressing and 1 tablespoon blue cheese crumbles to the cheese sauce.
Top with crumbled blue cheese and extra panko before baking. Serve with celery sticks and carrot sticks for dipping. The tangy, spicy kick makes this a crowd-pleaser for game day or casual dinners. 🍗
Sweet Potato Swap
Replace half the elbow macaroni with 1.5 cups cooked and mashed sweet potatoes for a sweet and savory twist. Add 1 teaspoon cinnamon and ½ teaspoon pumpkin pie spice to the cheese sauce. Top with toasted pecans and a drizzle of honey before baking.
This fall-inspired version pairs beautifully with apple slices or whipped cream for dessert. The sweet potatoes add natural sweetness that balances the rich, cheesy sauce. 🍠
Nutrition facts
Frequently asked questions
Can I use pre-shredded cheese in this recipe?
I strongly recommend grating your own cheese using a box grater for the best texture. Pre-shredded cheese contains anti-caking agents that prevent the cheese from melting smoothly, which can lead to a grainy baked mac and cheese. For Gruyère and sharp cheddar, block cheese is ideal—it melts beautifully and creates those perfect pull-apart rivers.
Why does my cheese sauce get grainy or separate?
Graininess usually happens when cheese melts too fast or the sauce isn't hot enough. Always add cheeses in stages—cream cheese first, then sharp cheddar, then Gruyère—while keeping the sauce on low heat. If it thickens too much, whisk in reserved pasta water 1 tablespoon at a time until smooth. Never boil the sauce or it will curdle.
How do I keep the pasta from getting mushy when baking?
Cook the macaroni to al dente (1 minute before package instructions) and drain it well before mixing with the cheese sauce. The key is using a 9x13-inch baking dish that's only ¾ full—this prevents overcrowding. Bake at 375°F for 25-30 minutes and avoid opening the oven door during baking to maintain consistent heat.
Can I make this ahead of time?
Assemble the dish (without baking) and refrigerate in an airtight container for up to 24 hours. When ready to bake, add 5-10 minutes to the baking time at 375°F to account for the cold start. For leftovers, reheat covered at 350°F for 10-15 minutes—add a splash of milk to restore creaminess. The flavors actually improve overnight!
What's the best way to get crispy edges?
For maximum crispiness, use a 9x13-inch baking dish and spread the mac and cheese evenly in a thin layer. Sprinkle 0.25 cup panko breadcrumbs on top before baking. Bake at 375°F for 25-30 minutes, then broil for 1-2 minutes at the end—watch closely! The panko creates a golden, crackly crust while the cheese underneath stays creamy.
