Gather all your ingredients. Measure out the walnuts, pine nuts, garlic, basil, salt, pepper, olive oil, and Parmesan cheese.
In a dry skillet over medium heat, toast the walnuts and pine nuts for about 5-7 minutes until golden and fragrant.
In the food processor, combine the toasted walnuts, pine nuts, garlic, basil, salt, and pepper. Pulse a few times to break down the ingredients.
While the food processor is running, slowly drizzle in the extra virgin olive oil to emulsify the sauce.
Add the freshly grated Parmesan cheese and pulse until well combined and at your desired consistency.
Taste your pesto and adjust seasoning if necessary.
Transfer the pesto to a storage container, covering the surface with a thin layer of olive oil to prevent browning.