Preheat the oven to 350 degrees and prepare a baking sheet by lining with parchment paper or a silicone mat. Set aside.
In a large bowl, use an electric mixer on medium speed to beat together the butter, white sugar and brown sugar until light and fluffy. Add the eggs and vanilla and beat until fully combined. Set aside.
In a second large bowl, combine flour, baking soda, baking powder, cinnamon and salt. Carefully add the dry mixture to the wet mixture until fully combined. Stir in carrots, and nuts if using, and mix until well combined.
Using a medium cookie scoop, drop balls of dough, approximately 1-2 tablespoons in size, onto the prepared baking sheet. Space about two inches apart.
Bake for 10-12 minutes or until cookies are thoroughly cooked. Allow to cool completely prior to frosting.