Nitric acid is one of many compounds that humans have stolen from nature for use in commercial markets. Were you to go out foraging for some nitric acid, the rain would be a good start as the formula comes together in the atmosphere before hitching a ride down to Earth on water droplets.
The colorless liquid that is nitric acid gives off yellow or red fumes in strong enough concentrations, with an acrid odor to boot. While it falls from the skies at concentrations benign enough as to be unnoticeable, it can be highly corrosive in its purest form.
Nitric acid formula
The formula for nitric acid is HNO₃, representing hydrogen, nitrogen, and oxygen. That makes the nitric acid formula one of the simpler ones, and structurally it’s made up of a central nitrogen molecule that’s double-bonded to one of its three oxygen molecules.
The other two oxygen molecules in the nitric acid formula are therefore available to form bonds with other things (oxygen can form two bonds because it needs two electrons to complete its outer ring), which is why hydrogen is attached to one of them.

Is nitric acid dangerous?
The degree of risk surrounding nitric acid depends on the context in which you’re encountering it. As we already mentioned, nitric acid is present in some raindrops but mixed in with all the rest it’s harmless.
However, take nitric acid in its purest form and you have what’s considered one of the seven strongest acids (have you heard of fluoroantimonic acid? Hoo boy, that's a killer). Nitric acid is used in everything from fertilizers to dyes and explosives, and factory workers in these settings have to take appropriate care to avoid injury and illness caused by exposure.
Where does nitric acid come from?
The nitric acid formula comes together in our atmosphere, far above Earth’s surface where lightning facilitates the chemical reaction. Bolts of lightning are capable of doing this because they can split molecular bonds and free up space for nitrogen molecules to bond with other things, like oxygen.
As it rains, nitric acid comes tumbling down to the planet’s surface where it does our soil a solid in forming nitrates that support plant growth.
So, next time it’s raining, take a little look up and say thank you. Acid in rain isn’t always the plot in a disaster movie, often it’s a win for the planet.