Preheat and prep: Heat the oven to 350°F (175°C).
Line two baking sheets with parchment paper. If your kitchen is warm, plan to chill the dough for 20–30 minutes before baking.
Mix dry ingredients: In a medium bowl, whisk 2 cups all-purpose flour, 3/4 cup cocoa powder, 1 teaspoon baking soda, 1/2 teaspoon fine sea salt, and 1–2 tablespoons instant espresso powder. Set aside.
Cream butter and sugars: In a large bowl, beat 3/4 cup softened unsalted butter with 3/4 cup granulated sugar and 3/4 cup brown sugar until light and fluffy, about 2–3 minutes.
Add eggs and extracts: Beat in 2 large eggs one at a time.
Mix in 1 teaspoon vanilla extract and 1/2 teaspoon peppermint extract. Taste the dough later and adjust peppermint if needed.
Combine: Add the dry mixture to the wet ingredients and mix on low just until combined. Do not overmix.
Fold in 1 1/2 cups chocolate chips or chunks.
Chill (optional but helpful): If the dough feels soft or sticky, chill 20–30 minutes. This helps the cookies keep their shape and enhances the fudgy texture.
Portion and top: Scoop 2-tablespoon mounds (a medium cookie scoop) onto prepared sheets, spacing about 2 inches apart. If using, gently press extra chocolate chips or a pinch of crushed candy canes on top for looks.
Bake: Bake 9–11 minutes, until the edges are set and the centers look slightly underbaked.
The cookies will firm up as they cool. If using flaky sea salt, sprinkle a tiny pinch on top right after baking.
Cool: Let cookies rest on the sheet for 5 minutes, then transfer to a wire rack to cool completely. If adding more crushed candy canes, press them on while the chocolate is still soft.
Adjust peppermint: After baking a test cookie, you can stir in an extra 1/8 teaspoon peppermint extract to the remaining dough if you want a stronger mint flavor.