Yes! A commenter made pesto with the frozen basil and said "it worked out fine! (With) so much flavor, more than expected from freezing." To make it easiest, measure the basil before freezing (according to your recipe) and label the bag with the amount and "for pesto" so you remember.