A great substitute for pine nuts in pesto is walnuts. Walnuts have a similar nutty flavor and slightly softer texture, making them an excellent alternative in a basic basil pesto recipe. Not only do walnuts offer a delicious taste, but they are also more budget-friendly compared to pine nuts, which can be quite expensive.