Baking soda and baking powder are chemical leaveners that lighten baked goods. When they are fresh, they cause chemical reactions that release carbon dioxide in batters, which allow pastries to be light, soft and airy.
But, if you use stale baking powder or baking soda, you will end up with a flat dense treat. And nobody wants a flat, thick or heavy cake, cookie or any other sweet treat. You can save yourself the frustration (I may or may not be speaking from experience) of learning that your baking soda and/or baking powder isn't fresh by doing quick and simple tests to ensure that the products are still good and active. Here's how:
If the mixture starts bubbling immediately, the baking powder is good.
To test baking soda, mix 1/4 teaspoon baking soda with 2 teaspoons vinegar (any type).
If the mixture starts bubbling immediately, the baking soda is good.
It's easy-peasy to do. Plus, you probably have all the materials on hand. :)
I hope this was helpful!