Preheat your oven to 350°F (175°C). Grease the loaf pan or line it with parchment paper for easy removal.
In a mixing bowl, combine the grated zucchini, granulated sugar, vegetable oil, eggs, and vanilla extract. Mix until well combined.
In a separate bowl, whisk together the flour, baking soda, baking powder, ground cinnamon, and salt.
Gradually add the dry ingredients to the wet mixture, stirring until just combined. Be careful not to overmix; it’s okay if there are some lumps.
If using, fold in the chopped walnuts or pecans.
Pour the batter into the prepared loaf pan and smooth the top.
Bake in the preheated oven for 50-60 minutes, or until a toothpick inserted into the center comes out clean.
Once baked, remove from the oven and let it cool in the pan for 10-15 minutes. Then, transfer the bread to a wire rack to cool completely before slicing.
For added flavor, you can include a teaspoon of nutmeg or chocolate chips in the batter.
Make sure to squeeze out excess moisture from the grated zucchini to prevent a soggy bread.