How to Prevent Porosity in Welding: Causes & Fixes

Porosity in welding happens when gas bubbles get trapped in the weld pool as it solidifies. The result is small holes, either on the surface or hidden inside the weld, that weaken the joint. Preventing it comes down to three things: keeping contaminants away from the weld zone, maintaining proper shielding gas coverage, and storing your consumables correctly.

What Actually Causes Porosity

During welding, the molten weld pool can absorb gases like hydrogen, nitrogen, and oxygen. As the metal cools and begins to solidify, these gases try to escape. If the metal freezes before the bubbles reach the surface, they’re locked in place as pores. The specific gas depends on the material. Carbon steel is susceptible to hydrogen, nitrogen, and oxygen. Stainless steel and aluminum are primarily affected by hydrogen. Nickel alloys are most sensitive to nitrogen.

The sources of these gases fall into a few categories: surface contamination on the base metal or filler, moisture in electrodes, atmospheric air reaching the weld pool through poor shielding, and equipment problems that disrupt gas flow. Each one has a straightforward fix.

Clean the Base Metal Thoroughly

Surface contamination is one of the easiest causes to eliminate and one of the most commonly overlooked. Grease, oil, rust, mill scale, paint, primer coatings, and even residue from non-destructive testing all introduce gas into the weld pool when they burn off. Thick coatings generate especially large amounts of fume and gas.

The cleaning method depends on the material you’re welding:

  • Carbon steel: Grind the joint area to remove scale, rust, and any coatings.
  • Stainless steel: Degrease, wire brush with a dedicated stainless brush, then degrease again.
  • Aluminum: Degrease with acetone or a similar solvent, wire brush with a stainless steel brush, then degrease a second time. Chemical cleaning with sodium hydroxide or nitric acid is also an option for more demanding work.
  • Copper and nickel alloys: Degrease, wire brush, then degrease again.

Clean not just the joint itself but a few inches of the surrounding base metal as well. If you’re using a solvent cleaner, let it fully evaporate before you start welding, and always clean before assembling the joint. Once parts are fitted together, it’s nearly impossible to remove cleaning solution trapped between them.

Aluminum Requires Extra Attention

Aluminum deserves its own discussion because it forms a hydrated oxide layer that readily absorbs moisture. This oxide re-forms almost immediately after you remove it, and moisture trapped in the oxide is a primary hydrogen source during welding.

The standard approach is a two-step process: degrease first, then mechanically remove the oxide by wire brushing or scraping. Use dedicated tools for aluminum only, stored in clean conditions, to avoid cross-contamination from steel grinding dust or shop grime. Where possible, keep aluminum fabrication physically separated from other metalwork in the shop.

How quickly you need to weld after cleaning depends on the quality standard you’re working to. For stringent porosity requirements, oxide removal should happen within hours of welding, not days. In a humid environment, that window shrinks further. For less critical work, a day or two is often acceptable, but sooner is always better.

Store Electrodes and Filler Properly

Low-hydrogen stick electrodes like E7018 are designed to minimize hydrogen in the weld, but they lose that advantage quickly if they absorb moisture from the air. Once you open a hermetically sealed container, these electrodes should go into a holding oven set to at least 250°F (120°C). If they’re left out, atmospheric exposure should not exceed four hours.

If electrodes have been exposed beyond their allowable time, they need to be re-baked at a higher temperature. Simply drying them at 250°F isn’t enough to drive out absorbed moisture. And electrodes can only be re-baked once. After a second over-exposure, they should be discarded. This might feel wasteful, but using moisture-contaminated rods is a reliable way to produce hydrogen porosity, especially in structural or code work.

MIG wire and TIG filler rods are less sensitive than stick electrodes, but they still benefit from clean, dry storage. Wipe down filler rods before use if they’ve been sitting out, and avoid handling them with greasy gloves.

Get Shielding Gas Coverage Right

Poor shielding gas coverage is the single most common cause of welding porosity. When atmospheric air reaches the molten weld pool, nitrogen and hydrogen dissolve into the metal and create pores as it solidifies.

Flow rate is the main variable you control. For TIG welding, a typical starting point is around 15 to 20 CFH (cubic feet per hour), adjusted based on cup size. A #4 cup might run well at 15 CFH, while a #10 cup might need 25 to 30 CFH. For MIG welding with a standard 5/8-inch nozzle, 30 to 45 CFH is a common range for manual operations.

More gas is not better. Cranking up the flow rate past what’s needed creates turbulence at the nozzle exit, which actually pulls atmospheric air into the gas stream and defeats the purpose of shielding entirely. A practical approach is to start at 20 CFH for TIG, then dial down on a test piece until you start seeing problems, and then back off slightly from that threshold. The sweet spot for TIG is often around 15 CFH.

Wind and drafts are the other major threat to gas coverage. Even a gentle cross-breeze can blow your shielding gas away from the weld pool. If you’re working outdoors or near open bay doors, set up wind screens. Fans in the shop that improve comfort can ruin your welds.

Inspect and Maintain Your Equipment

A perfectly set flow rate means nothing if the gas isn’t reaching the weld pool cleanly. On a MIG gun, spatter buildup inside the nozzle and on the contact tip and diffuser restricts gas flow or makes it turbulent. Either situation leaves the weld pool unprotected. Clean or replace the nozzle regularly, especially during long production runs.

Check less obvious points too. Damaged gas hoses, loose fittings, and worn O-rings on the power pin of the MIG gun can all allow air to leak into the gas line. A simple leak at any connection between the regulator and the nozzle dilutes your shielding gas with atmosphere. Periodically check these components and replace anything that’s cracked, loose, or worn. A worn gun liner can also trap moisture or debris that contaminates the wire as it feeds through.

Welding Technique Matters

Even with clean material, dry electrodes, and good gas coverage, technique errors can introduce porosity. Holding the torch too far from the workpiece spreads the shielding gas cone and reduces its effectiveness at the weld pool. For MIG, keep the nozzle-to-work distance consistent, typically 3/8 to 3/4 inch depending on the application. For TIG, keep the cup close enough that the gas envelope fully covers the puddle and a short length of cooling weld behind it.

Travel speed plays a role as well. Moving too fast doesn’t give gas bubbles time to rise out of the weld pool before it freezes. Moving too slowly can cause excessive heat that pulls in more atmospheric contamination. A steady, moderate travel speed gives trapped gas the best chance to escape while maintaining good shielding.

Whipping or weaving excessively with a MIG gun moves the arc outside the shielding gas envelope on each swing. Tight, controlled movements keep the weld pool protected throughout the pass.

What Codes Allow

Under AWS D1.1, the structural welding code most commonly applied in the U.S., the primary concern is piping porosity, which is elongated pores that extend toward the weld surface. General scattered or cluster porosity that stays internal is technically acceptable under the letter of the code. That said, many individual welding programs and project specifications are stricter than the minimum code requirement. Some programs reject any surface porosity at all. Always check the specific acceptance criteria for your project before deciding whether a porous weld needs repair.