What's the difference between baking soda and baking powder?
And can you substitute one for the other?

It’s hard to truly understand the importance of baking soda and baking powder — and the difference between the two — until the day you accidentally stumble and add one instead of the other, or forget to add one entirely. If you need visuals, just imagine sunken banana bread, squat scones, and deflated cupcakes. An eerie sight, am I right?
Sometimes it can be downright confusing how a mix-up in leavening agents makes or breaks a cake batter or cookie dough. And such ignorance is never bliss, especially when it results in frightening baked goods. So to avoid any baking mishaps, here’s a breakdown of the difference between baking soda and baking powder, what they contribute to baking, and suggestions for substitutions if you find yourself without one.
Let’s quickly return to high school chemistry class. Baking soda (or sodium bicarbonate) is a base compound with a pH level of 8. When it mixes with an acidic solution, it reacts to produce carbon dioxide — a.k.a. the gas required to get that desirable lift in baked treats.
As a result, baking soda needs an acidic partner to work its magic; this can be a wet ingredient like sour cream, buttermilk, yogurt, lemon juice, vinegar, maple syrup, or honey, but it could also be a dry ingredient like brown sugar or natural cocoa powder. (Dutch-process won’t contain enough acidity.) Once paired and mixed, baking soda instantly starts to react with that acid. Therefore, with recipes that lean on baking soda, it’s better to get batters and doughs in the oven straightaway so the reaction doesn’t die down before you even start baking.
Baking soda creates a less chewy and more tender, airy texture in baked goods. It’s no wonder it’s called for in quick bread recipes to provide shape and soft crumb without having to rise for a long time like traditional yeasted bread. As a leavener, baking soda is more responsible for the outward spread of baked goods. (Remember: soda = spread).
While baking soda needs a co-conspirator, baking powder is a complete mixture of baking soda and cream of tartar, a powdered form of tartaric acid, so it has both the basic and acidic components necessary to produce carbon dioxide. In grocery stores, you’ll often come across “double-acting” baking powder, meaning it reacts twice. The first reaction occurs when you’re mixing batter and the powder dissolves. (Think about how when you let pancake batter rest for around 15 minutes, it thickens and bubbles slightly — this works on the same principle.) The second reaction takes place when the batter hits the heat and begins to bake.
Inside any high-rise scone or jumbo muffin is typically a good amount of baking powder. That’s because baking powder adds height, fluff, and lightness. (Remember: powder = puff).
Just feast your eyes on the glow-up that 1 tablespoon gives Baking Powder Biscuits. I’m not saying if you skimp on the baking powder, you’ll be left with dense, inedible doorstops, but I’m not not saying that either — there’s a reason the ingredient is in the recipe name.
If a recipe requires both leavening agents, there’s a good chance there’s acid included in the recipe, yet not enough to trigger a full reaction when combined with just baking soda on its own. In such cases, baking powder comes in as reinforcement to do most of the leavening, while baking soda is there to neutralize the acid (lessening the astringent taste) and contribute some lifting power. Now that’s teamwork!
Baker's tip: If you wind up with an unlabeled jar of white powder and don't know if it's baking soda or powder, use this test: Put a teaspoon of the powder into a tablespoon of water. If it fizzes, it's baking powder. If it doesn't, it's baking soda.
You can't substitute equal amounts of baking soda for baking powder in a recipe, or vice versa. But! There is some wiggle room for substituting.
To put it briefly: Don’t substitute these ingredients for each other (or other swaps) if you can help it, but should you be in a pinch (maybe in the middle of mixing your brownie batter when you realize you’re missing baking powder) there are a few options to swap in. Some may be sitting in your kitchen as we speak! It’s important to keep in mind that these ingredients are happy to step in and do a good job, but they won’t perform absolutely the same as the original leavener called for in the recipe.
Baking powder: Baking powder can be used to replace baking soda, though not at a 1-to-1 ratio. Because the former is not as strong as the latter, it’s important to use three times the amount of baking powder as baking soda. Be aware, a slightly bitter, off-putting taste might result from using that much baking powder.
Baking soda + cream of tartar + cornstarch: You can't just sub baking soda directly for baking powder, but you can use it alongside other ingredients as a swap. Remember, baking powder is a mixture of baking soda and cream of tartar — which means you can easily make it yourself.
Baker’s ammonia: Baker’s ammonia is a trusty leavener from the 19th century that produces a light, tender crumb similar to what you’d get from baking powder. You can use it 1:1 in place of baking powder. Be aware: It doesn't smell great, but no need to worry, as the smell totally dissipates by the time baked goods are done.
Lemon juice or vinegar: These acids react with baking soda to mimic the power of baking powder.
Self-rising flour: It’s foolproof because it already has leavening agents added — with salt and baking powder included, it makes it an excellent all-around ingredient swap.
Read the label! Double — no triple — check that you’re using the ingredients that you’re actually supposed to be using and in the correct proportions. And with that, always check expiration dates for freshness. (They don’t last forever!)