This post may include affiliate links.

Bright basil pesto meets a creamy Havarti sauce in this easy pesto mac and cheese. It’s a cozy, 20-minute stovetop dinner my whole family requests on repeat.

Pesto mac and cheese
Save this recipe!
Get this sent to your inbox, plus get new recipes from us every week!

Oh hey there, creamy pesto mac and cheese! This seriously cozy comfort food is just as gooey as it looks, and adding a swirl of bright green basil pesto is a total genius move.

I wish I could take credit for this idea myself, but it comes from Maria Lichty, my friend and author of the new Two Peas and Their Pod Cookbook. This pesto mac and cheese was an instant hit in our house: my kids are obsessed and so am I. It’s a fantastic easy dinner idea using purchased or homemade basil pesto: add a salad or steamed broccoli to make it a meal.

5 Star Reader Review

⭐⭐⭐⭐⭐ “I made this the other night and it tasted great! My husband loved it. I had never thought of using Havarti cheese. I can’t wait to make it again:)” -Jacci

Why You’ll Love This Recipe

This pesto mac and cheese was a huge hit in this house: the first time we made it, my son Larson (age 2 at the time) could not stop eating it. “Mac and cheese!” he would yell and try to get it out of the refrigerator himself, which is quite the feat!

This one is a serious dinnertime winner. The way the Havarti cheese melts into the creamiest sauce makes it our new favorite. (I thought Gouda mac and cheese was my ultimate…before that Spaghetti squash mac and cheese.)

Pesto mac and cheese

The Ingredients You’ll Need

Here are the ingredients you’ll need for this pesto mac and cheese:

  • Short pasta: Elbow macaroni is the obvious choice, but I love using gigli for fun. Shells, farfalle, fusilli, penne, or rigatoni all work.
  • Butter and all-purpose flour: The base of the roux that thickens your sauce.
  • Milk: I use 2% but you can use any type.
  • Havarti or mozzarella: Havarti is my top pick. Shredding it yourself melts far better than pre-shredded.
  • Basil pesto: Homemade or a good store-bought jar: the best is my Basil Pesto.

How to Make Pesto Mac and Cheese

The only part that requires some technique is making a roux. What’s a roux? A “roux” is flour and butter cooked together and used to thicken sauces. It’s usually made from equal parts of flour and butter, and is used in most mac and cheese recipes. Here’s the short version (the full recipe is in the card below):

  1. Cook the pasta in well-salted boiling water until just al dente, then drain.
  2. Make the roux: Melt the butter, whisk in the flour, and cook briefly to form a smooth paste.
  3. Mix the sauce: Whisk in the milk until smooth, then stir until it thickens. Add the shredded cheese and stir until melted and glossy, then fold in the pesto.
  4. Combine: Add the pasta, toss to coat, and season to taste.
Pesto mac and cheese

What Pasta to Use (Gigli and Beyond)

I used gigli pasta for this pesto mac and cheese because I love using unique pasta shapes. Gigli is a short pasta shape with a fluted edge that is rolled into a cone shape or flower. This unique type of pasta is also known as campanelle and is best when served with thick sauces.

It’s worth finding a fun pasta shape like gigli for this pesto mac and cheese: just for the novelty! But any short pasta shape will work, including macaroni (obviously!), shells, farfalle, fusilli, penne, and rigatoni.

Homemade vs. Store-Bought Pesto

If it’s the season for basil and you’ve got a plant, making homemade pesto makes this mac and cheese even more terrific. Of course if it’s not, you can use purchased pesto: here’s one of my favorite brands.

If you decide to make your own, we have lots of great pesto recipes. My Best Basil Pesto is the classic, made with pinenuts, basil and Parmesan, But you can use lots of types of nuts in pesto: try this Cashew Pesto with Basil or Walnut Pesto with Basil. (For more recipes with pesto, see my best recipes with pesto.)

Pesto mac and cheese

Ways to Serve It

I like to serve this rich recipe with some veggies to keep it lighter and add fiber! Here’s what I like to add:

Head to 10 Best Sides to Serve with Mac and Cheese for more ideas.

Dietary Notes

This pesto mac and cheese recipe is vegetarian. For gluten-free, use gluten-free pasta.

Frequently Asked Questions

Does cheese go well with pesto?

Yes. Pesto already contains Parmesan, so it’s built to pair with cheese. It’s especially good with mild, creamy melting cheeses like Havarti and mozzarella, which let the basil and garlic shine rather than competing with them.

What’s the secret to the best pesto mac and cheese?

Add the pesto at the very end off high heat. Havarti melts into a silky sauce, and stirring in the pesto last keeps its flavor fresh and its color bright green.

Why did my sauce turn a grayish color?

If your pesto mac and cheese looks dull or grayish, it’s usually the pesto oxidizing from too much heat (usually with jarred pesto). Stir the pesto in at the end over low heat. Important: If you’re worried about it being green, use a homemade bright-green basil pesto for the most vibrant result!

Save this recipe!
Get this sent to your inbox, plus get new recipes from us every week!
Print

Pesto Mac and Cheese

5 Stars 4 Stars 3 Stars 2 Stars 1 Star

5 from 1 review

A swirl of basil pesto brings so much flavor to this classic comfort food! This pesto mac and cheese features Havarti cheese for ultra creaminess.

  • Author: Sonja Overhiser
  • Prep Time: 5 minutes
  • Cook Time: 15 minutes
  • Total Time: 20 minutes
  • Yield: 6 1x
  • Category: Main Dish
  • Method: Stovetop
  • Cuisine: American

Ingredients

  •  Kosher salt and freshly ground black pepper
  •  12 ounces elbow macaroni or other short pasta shape (we used gigli pasta)
  •  4 tablespoons unsalted butter
  •  ¼ cup all-purpose flour
  •  2 cups 2% milk at room temperature
  •  2 cups shredded Havarti or mozzarella cheese (8 ounces)
  •  3 tablespoons Basil Pesto or store bought basil pesto

Instructions

  1. Bring a large pot of salted water to a boil. Add the pasta and cook just until al dente, about 8 minutes. Drain the pasta and set aside.
  2. In a large pot, melt the butter over medium heat. Reduce the heat to low and whisk in the flour to create a paste. Add the milk and whisk until smooth. Increase the heat to medium and continue whisking until the sauce starts to thicken, about 2 minutes. Stir in the shredded cheese and continue stirring until the cheese is melted and the sauce is smooth. Fold in the pesto.
  3. Add the pasta, stirring to combine, and cook just until the pasta is warmed through. Season with salt and pepper to taste. Serve immediately.

Notes

Reprinted with permission from Two Peas and Their Pod Cookbook by Maria Lichty

Did you love this recipe?

Get our free newsletter with all of our best recipes!

About the authors

A Couple Cooks

Recipes by Alex & Sonja

We’re Alex & Sonja Overhiser: cookbook authors, busy parents, & a real life couple who cooks together! We started the A Couple Cooks food blog in 2010 to share simple, seasonal recipes, healthy meal planning tips, and the joy of cooking. All recipes are written & photographed by us (and tested on our two kids!).

Leave a Comment

Recipe rating 5 Stars 4 Stars 3 Stars 2 Stars 1 Star

8 Comments

  1. Jacci U says:

    I made this the other night and it tasted great! My husband loved it. I had never thought of using Havarti cheese. The one recipe I make calls for Gruyere and cheddar. I did double the Havarti cheese. I also find it easier to make the milk sauce without adding the cheese to it. When the pasta is finished, I add the milk (I use oat milk) first, then add the cheese and stir it in on very low heat. It makes it easier to melt and combine. I can’t wait to make it again:)

  2. Anonymous says:

    Why did it turn grey when I added pesto to cheese sauce?

    1. Sonja Overhiser says:

      Hmm that’s interesting, we’ve never had that happen before! What brand of pesto were you using? Or what it homemade?

  3. Sarah says:

    Made this yesterday and it was delicious!

  4. Maria says:

    Thanks SO much for sharing! I am thrilled you loved the mac and cheese! I wish we could get our boys together for a mac and cheese play date:) I appreciate your support! xo

  5. Kathleen Henry says:

    Pesto and Mac and Cheese together?? This is brilliant!

  6. Terry Covington says:

    This looks great! I have used Havarti for grilled cheese sandwiches, never thought to put it in mac and cheese, but it’s one of those perfect melting cheeses. I think its unusual and mild flavor would also be the perfect pair with the pesto. Thanks for sharing this great new recipe from Maria’s new cookbook!