01 - Preheat the oven to 350°F and line a baking sheet with parchment paper.
02 - Whisk together flour, sugar, baking powder, and salt in a large bowl.
03 - Beat eggs, vanilla extract, and almond extract (if using) until combined.
04 - Add wet mixture to dry ingredients and stir until a sticky dough forms.
05 - Fold pistachios and dried cranberries into the dough until evenly incorporated.
06 - Divide dough in half and shape each into a 12-inch long by 2-inch wide log using floured hands. Place on prepared baking sheet with space between.
07 - Bake logs for 25 to 30 minutes until golden and firm to touch. Remove and cool for 10 minutes.
08 - Reduce oven temperature to 300°F. Slice logs diagonally into 1/2-inch thick slices and arrange cut side down on baking sheet.
09 - Bake slices for 10 to 12 minutes, flip, then bake an additional 8 to 10 minutes until crisp and golden.
10 - Transfer biscotti to a wire rack and cool completely before serving or storing.