If you're talking about E-numbers:
- E500 Sodium carbonates
- E503 Ammonium carbonates
Baking soda is usually sodium hydrogen carbonate. It is made from sodium chloride (derived from seawater or rocks), ammonia and calcium carbonate. Ammonia is made by reacting nitrogen from the air with hydrogen, which may be produced from water or from hydrocarbons. Hydrocarbons include fossil fuels such as coal, oil and gas. While coal is derived from ancient plant matter, oil and gas are ultimately made from the bodies of sea creatures that decomposed under intense heat and pressure. Calcium carbonate is found in the ground as limestone. This is partly made from the fossilized bones and shells of dead animals. Therefore, it is possibly debatable whether ammonia (also used to make ammonium chloride) and calcium chloride should be considered vegan, but in general practise, they are considered vegan and used by vegans. The animals involved did not die or suffer with the purpose of making these products, and virtually all dead organisms will be decomposed leaving their mineral remains behind. It would be impossible to avoid all minerals on the basis that they had once formed part of an animal.
Considering an ethical decision in this area, I use sodium hydrogen carbonate for cleaning. It has a much lower impact on the environment than other chemicals used in cleaning products, so I consider it better to use than those chemicals from an animal-rights perspective, since protecting the environment in general protects animal habitats.
Baking powder usually includes flour of some kind, which is likely to be vegan, but may possibly not be vegan. See How can I tell if wheat flour is vegan?. Look for a baking powder labelled vegan if you are concerned.
Other leavening agents include yeast. See Is yeast-risen bread (or other baked products) vegan?.
Other leavening agents include vitamin C (ascorbic acid, which like any acid reacts with carbonates to produce carbon dioxide). See Can food of purely mineral origin be considered vegan?.
There may be other leavening agents which are not vegan. If a product's labelling does not say it is vegan and you are concerned, you can contact the manufacturer, who may be able to advise. If not, choose a different product.