There are many types of stainless steel, such as ferritic stainless steel, austenitic stainless steel, martensitic stainless steel, duplex stainless steel, precipitation hardening stainless steel, etc., as shown in the figure below.

*Notes on the figure:
- Martensitic stainless steel*: Carbon content not exceeding 1.2%, plus a small amount of nickel;
- Precipitation hardening stainless steel**: 0.05-3% copper, 0.05-5% molybdenum;
- Duplex (ferritic-austenitic) stainless steel***: 3-5% copper.
The reason why stainless steel can resist rust is mainly because it contains at least 12% chromium (Cr), which can also be seen from the figure above. Chromium on the surface reacts with oxygen in the air to form a dense chromium oxide (Cr₂O₃) passive film. Although this passive film is extremely thin, it is highly compact and can isolate the metal from external media, preventing chemical reactions and thus protecting the metal from corrosion.
(Diagram of Cr₂O₃ passive film)
Even if the surface of stainless steel is subject to mechanical damage or chemical erosion, the chromium oxide passive film can self-heal. As long as there is sufficient oxygen, the chromium on the stainless steel surface can continue to react with oxygen to repair the damaged passive film and restore its protective effect.
Under the protection of the chromium oxide passive film, stainless steel can resist corrosion from most corrosive media such as acids, alkalis, and salts. However, in practice, people still occasionally see stainless steel rusting, as shown in the figure below. So what causes this?
(Diagram of rusted stainless steel)
In fact, stainless steel is not completely rust-proof—it can still rust if used improperly. Today, we will explore the possible reasons behind this, so you can refer to them when troubleshooting in the future.
For example, the actual chromium content is less than 12%, or the content of key elements such as nickel and molybdenum is insufficient, which cannot achieve effective rust prevention.
Environments with halide ions (such as Cl⁻, Br⁻, I⁻)—including seawater, salt spray, chlorine-containing cleaning agents, etc.—can penetrate the passive film, forming tiny corrosion pits that develop deep into the metal.
When stainless steel is heated to 427~816℃ (e.g., during welding or heat treatment), chromium carbide (Cr₂₃C₆) precipitates at the grain boundaries. This leads to chromium depletion near the grain boundaries (chromium content < 12%), thereby losing the ability to form a passive film.
When stainless steel is under tensile stress, if factors mentioned in points 2 and 3 are also present, the stress will accelerate the penetration of corrosive media and cause crack propagation along or through the grain boundaries.
- Contamination: Contact with carbon steel tools leaves residual iron filings, which trigger galvanic corrosion due to the potential difference between metals;
- Damage: Scratches, welding spatter, etc., damage the passive film, leading to corrosion initiation before the film can be restored;
- Other issues: Oil stains on the surface hinder the formation of the passive film, while dust and impurities absorb moisture and corrosive substances, accelerating local corrosion.