How To Prevent Porosity in Welding

The presence of welding porosity can undermine the effectiveness of welded joints, leading to structural weaknesses and compromised performance.

In this article, we cover welding porosity, its types, causes, detection methods, and most importantly, practical strategies to prevent its occurrence.

Jump to a section: What is Welding Porosity | Types of Porosity | Causes of Porosity | Detecting Porosity | How to Prevent Porosity | Shielding Gas | Alloy Elements |  Porosity-Free Welds | FAQ 

What is Welding Porosity?

Porosity in welding is the presence of cavities in the weld metal caused by the solidification or “locking in” of gas pockets caused by impurities or contaminants in the molten weld pool. 

This welding defect can lead to detrimental effects. In structural welded connections, porosity can reduce the load-bearing capacity of the weld joint. In pipe and vessel welds, porosity can lead to reduced strength, diminished pressure capacity, and even loss of containment. 

The best way to eliminate this potentially catastrophic welding defect is to understand the causes of porosity and implement quality control measures in the welding process.

Types of Porosity

Porosity can occur in several different ways and may vary greatly on the metal(s) being welded and the welding process used.

types of porosity in welding

Surface Porosity

Surface porosity refers to the presence of small voids on the exterior of a weld. These defects are most often visible to the naked eye and do not require special equipment for detection. Surface porosity is commonly caused by insufficient shielding gas coverage, improper base metal cleaning, or poor welding technique. 

Subsurface Porosity

In contrast, while small cavities are still present in subsurface porosity, it is not detectable through external visual inspection and requires more extensive weld examination techniques like radiographic examination. A weld may appear uniform and visually acceptable, but significant amounts of porosity may be present beneath the surface. Subsurface porosity can be caused by improper gas shielding, welding parameter variations, or contamination of the weld.


Wormholing is a particular type of porosity defect that is characterized by elongated tunnel-like voids that run longitudinally through the completed weld. Like subsurface porosity, wormholing is a defect that is not always visible on the surface of the weld and may require advanced inspection through radiographic examination. Wormholing is typically caused by factors like inadequate shielding gas coverage, improper welding parameters, or environmental contamination.


Cratering in welding is the formation of small, crater-like voids at the end of a weld bead where the weld pass has terminated. Detecting cratering can usually be done through visual inspection, as the defect is visible on the weld surface. Cratering is typically caused by an abrupt stop of the welding process, leading to insufficient filler material to fill the void and resulting in the formation of the crater. 

Causes of Porosity in Welding

To eliminate porosity in the weld, we must identify the varying factors that can lead to porosity defects.

Contamination from Oil, Paint, or Grease

Any surface contaminants like oil, grease, paint, dirt, or rust can become caught up in the molten weld pool and become trapped in the completed weld resulting in a porosity defect. That is why it is important to properly clean the metal before starting the welding operations.

Gas Entrapment

Inadequate shielding of atmospheric contaminants, such as oxygen, nitrogen, and hydrogen in the atmosphere, may lead to these elements becoming trapped in the weld puddle which will often result in porosity. It’s crucial not to weld in conditions with excessive wind or drafts, though specific sensitivities will vary greatly, depending on the process used.

Inadequate Shielding Gas

The shielding gas is used to create an atmosphere around the molten weld puddle and protect the weld metal from contaminants in the atmosphere, which, when trapped in the weld pool, will result in porosity. If the shielding gas is inadequate or its flow is in some way restricted, there will not be enough shielding gas to protect the weld. However, too much shielding gas can also be detrimental to the weld. Shielding gas that is fed through the nozzle at excessive rates or pressures can create turbulence and draw atmospheric contaminants into the weld which can lead to porosity, in addition to being wasteful of costly consumables.

Alloy Element Oxidation

The oxidation of alloy elements can significantly impact the formation of porosity in welding. When alloying elements such as chromium, aluminum or silicon are present in base metals or filler metals, they can react with oxygen in the atmosphere during welding operations which can lead to the presence of oxide contaminants that will often result in the formation of porosity. 

Mechanical Problems

Faulty welding equipment that has not been maintained and is not in proper working order can also lead to porosity defects. MIG guns, for example, that have nozzles with splatter built up, can restrict the flow of shielding gas, instrumental in eliminating porosity. Regulators that are not working properly or gas hoses that are cracked or have fittings that leak may lead to inadequate shielding in the weld pool. It is important to keep welding equipment well-maintained and in good working condition to be able to produce quality welds.


Of course, the welder has a significant part to play in ensuring the production of porosity-free welds. If the welder is traveling too fast, for example, this could leave the molten weld puddle unprotected from the essential shielding gas required to eliminate the formation of porosity. Also, if the MIG gun nozzle, for example, is too far removed from the weld puddle, there may be inadequate shielding gas protecting the weld which will likely result in porosity. 

Detecting Porosity in Welded Material

Porosity, depending on the type involved can be detected in several different ways. 

Visual Inspection

The most common and cost-effective method to detect porosity is a visual inspection. Surface porosity can be seen and measured by looking at the completed weld in adequate light, paying particularly close attention to the starts and stops in the weld pass.

The image below shows multiple porosity indications in a single-pass fillet weld, easily detectable with visual inspection.

porosity indications

Image source: International Journal of Engineering Application & Management

Destructive Testing

Destructive examination methods are often used to qualify welders or procedures and can be performed in a variety of ways. Nick-break specimens are made by notching a strap and pulling the weld apart in a tensile machine and examining the cross section for porosity. Fillet weld specimens can be cut in a saw and polished, followed by an acid solution applied that will enhance the cross-section of the weld making any porosity indication clearly visible.

Non-Destructive Testing

Radiography is very commonly used in pipe welding as it can give a very definitive look through the weld and detect porosity indications in all weld passes present. Porosity can also be detected with dye-penetrant or mag-particle examination on the surface or barely sub-surface level. Ultrasonic examination, widely used in structural steel weld examination, can detect the presence of a myriad of weld discontinuities throughout the entire thickness of the completed weld. Porosity, depending on the size and amount, may be difficult to detect with ultrasonic examination. Ultrasonic examination may show an indication that could be any one of several different discontinuities; incomplete fusion, porosity, or trapped slag. The true nature of the discontinuity may not be known until the weld metal has been removed and the discontinuity revealed. 

The image below shows a porosity indication on a radiographic image.

porosity indication on a radiographic image

Image source: Iowa State University Center for Nondestructive Evaluation

How to Prevent Porosity: Practical Tips

Now that we know what porosity is and how to find and identify it, let's discuss how to prevent it from occurring to begin with.

Material Preparation

As previously mentioned, the presence of dirt and debris, paint, oils, or grease can lead to the formation of porosity.  Proper material preparation is vital in ensuring quality welds. Use a grinder with a grinding wheel, sanding disc, or a wire brush to remove surface contaminants before welding. 

Material Cleaning

Some materials may have oxides present which will need to be cleaned to produce welds free of porosity. Oxides can be removed by heating the metal with a torch and/ or using a wire wheel or sanding disc. In some cases, muriatic acid or acetone can be very effective in removing oxides. 

Application of Correct Welding Technique

Welding technique can have a tremendous impact on porosity as well. If the travel speed is too fast, there may not be adequate shielding to protect the motel weld pool long enough for it to remain protected from atmospheric contaminants before it solidifies. In MIG and dual-shield flux-core welding, if the nozzle of the MIG gun is too distant from the puddle, there may also be a lack of sufficient shielding gas to protect the weld. Consult the welding procedure specification or manufacturer's recommendations to ensure proper welding parameters.

Proper Maintenance and Handling of Welding Equipment

It is important to ensure the welding machine and all of its parts are in proper working condition to produce welds free of porosity. If the MIG nozzle has weld spatter and debris built up, the gas flow may not be sufficient to properly shield the weld. If the regulator is not functioning properly and shielding gas hoses or fitting are leaking, then the full required volume of shielding gas may not make it to the weld puddle which could result in the formation of porosity.

Properly Storing Stick Electrodes

Stick welding electrodes that use the outer flux coating to act as shielding when consumed must be stored in a dry environment. If the flux absorbs moisture from the environment it is kept in, the electrodes should be disposed of. The most notorious example of this is the low-hydrogen series of electrodes, XX18, that should be stored in a rod oven once the packaging is opened to prevent them from becoming contaminated by moisture in the atmosphere. Welding electrodes that have absorbed moisture into the flux will not be able to provide proper shielding in the weld puddle and can often lead to porosity defects.

Conversely, XX10 series welding electrodes, specifically cellulose welding electrodes, require a little bit of moisture in the flux coating. If XX10 series welding electrodes have been left out too long, particularly in more arid climates, the flux may peel or fall off during welding operations resulting in a lack of fusion indications and possibly porosity.

Environmental Problems

When welding outdoors or in a drafty environment, it may be necessary to use a shelter or at least some sort of wind block. Excessive winds or drafts can blow the shielding gas away from the immediate area which will almost always result in porosity.

Effective Use of Shielding Gas

Shielding gas is a vitally important factor in producing quality welds free from the detrimental effects of porosity.

Choosing the Right Type of Shielding Gas

Selecting the appropriate shielding gas is essential for achieving optimal weld quality and preventing porosity. The type of shielding gas should be carefully considered, taking into account its compatibility with the specific base metals involved in the welding project and the welding process employed. The right choice enhances the overall weld performance and ensures a durable bond between the materials. 

Proper Regulation of Shielding Gas Flow

Proper gas flow is important to ensure adequate shielding gas coverage of the weld puddle. Not enough gas will not provide enough shielding and allow atmospheric contaminants into the molten puddle which will often lead to porosity. Conversely, too much gas may create a centrifugal effect and draw contaminants into the weld puddle. Generally speaking, shielding gas rates range from about 25 CFH to 35 CFH (cubic feet per hour), depending on the shielding gas and welding process in use.

Importance of Correct Gas Hose and Torch Setup

By selecting the proper sized gas hose you can optimize shielding gas flow and ensure stable, consistent flow of gas coverage. Too small a gas hose may restrict gas flow, resulting in a loss of coverage while a hose size that is too large can result in loss in the proper pressure required, leading to inadequate gas shielding coverage, not to mention wasting costly consumable materials.

Implication of Alloy Elements on Porosity

The presence or excess of certain elements in the weld zone can have a significant impact on weld quality and eliminate porosity defects.

For example, nitrogen can cause porosity in austenitic stainless steel. Nitrogen can enter the weld zone due to inadequate shielding gas coverage which can form gas voids, resulting in the formation of porosity in the solidified weld pool. 

Oxygen is another notorious culprit in porosity formation. Oxygen can enter the weld pool due to high wind, drafts, or inadequate shielding gas coverage and create gas pockets that will likewise form porosity upon solidification.

Hydrogen can lead to porosity by entering the weld zone through moisture in the base metal or filler metals, oils, or other contaminants on the metals being welded. Hydrogen can dissolve in the molten weld metal and can form the gas pockets that lead to porosity.

Recognizing Porosity-Prone Alloys

Some specific alloys can be more prone to porosity than others. For example, aluminum, due to its porous nature can absorb contaminants like grease and oils which can be difficult and time-consuming to clean. If not properly cleaned, however, these contaminants can result in the formation of porosity.

Cast iron, already fairly difficult to weld due to its inherent lack of ductility, can also be highly susceptible to the formation of porosity due to its high carbon content. Carbon monoxide gas can form during solidification of the weld puddle. Pre-heating the weld metal as well as careful selection of the filler metals and welding electrodes to be used can help prevent porosity from forming in cast iron welds.

Pre-Heating to Reduce Porosity

Another often overlooked method to eliminate porosity is through the use of pre-heating. Pre-heating the metal to a predetermined temperature will eliminate moisture which contains hydrogen, a major contributor in many instances of porosity.

Recognizing Porosity-Prone Welding Processes

Some welding processes are more susceptible to the formation of porosity than others. Dual shield flux core welding can be highly susceptible to porosity so great care should be taken to protect the weld environment from wind and drafts. 

Also, the amount of wire “stick-out” determines how far the MIG gun nozzle is to the weld puddle. Trying to weld dual shield flux core wire too close to the puddle will often result in the formation of wormhole-type porosity, usually visible on the surface but often found subsurface as well.

Post-Weld Heat Treatment Options

Post-weld heat treatment, when utilized, can reduce or even eliminate porosity in welded joints. The post-weld heat treatment process can cause the diffusion and escape of trapped gasses, leading to reduced porosity.  

On the other hand, it should be noted that post-weld heat treatment can potentially aggravate existing instances of porosity. The heat-treating process can induce changes in the metallurgical properties that can promote the growth or formation of new pores. For this reason, the decision to use post-weld heat treatment should be made only after careful consideration and consultation with the welding codes, engineers, or metallurgical experts.

Striving for Porosity-Free Welds

In summary, proper cleaning techniques, the correct type and amount of shielding gas, delivered in properly working welding equipment and properly stored welding electrodes are all important mitigation steps in preventing the formation of porosity in the completed weld. 

Summarizing Key Prevention Strategies

Following and adhering to welding procedures and manufacturer's recommendations regarding essential variables like amps, volts, shielding gas flow rates, and travel speed will help ensure quality welds that are free from porosity defects. Technique issues like proper work and travel angle and the correct distance away from the weld puddle can also help eliminate porosity.

The Impact of Quality Welding on Project Success

By taking time to consider and proactively address these considerations, you can create ideal conditions that will enable you to create sound, quality welds the first time, eliminating the need for costly, time-consuming repairs.

 Welding Porosity FAQs

How much porosity is acceptable in a weld?

The amount of porosity allowed in a weld may depend on the application. For example, the American Welding Society Structural Steel Welding Code allows a total of ⅜” of total accumulated porosity in one linear inch of weld and a total of ¾” in 12” of weld. (See AWS D1.1 - 2020 edition, table 8.1.)  In pipe and pressure vessel codes where pressure rating and containment are primary concerns, there may be very little, if any allowance for porosity defects.

Can porosity in welding be repaired?

Porosity can be repaired after it occurs but may only be done by grinding out the weld where the porosity has occurred and rewelding until there are no more indications of porosity present. Simply welding over porosity should be discouraged as it only serves to trap porosity under subsequent layers of weld metal.

How do you correct porosity in welding?

If you are getting porosity indications in the welds being performed, these are a few of the things to start checking to isolate the cause of the defects;

  • Is there a breeze or draft present in the work area? If there is, consider closing doors or setting up a weld curtain or windboard to keep the breeze out of the weld area.
  • Check the regulator to ensure proper flow of shielding gas. 
  • Perform a leak check on hoses and fittings to ensure that the shielding gas will make it to the weld zone.
  • Check the MIG gun or TIG torch, as the case may be to make sure there is no debris present obstructing the flow of coverage gas.
  • Check the condition of the welding electrodes, if using the SMAW process. Electrodes with flux flaking or peeling off should be thrown away. Low-hydrogen electrodes that have come into contact with moisture should be dried in a rod oven as long as they are not already excessively deteriorated. (Please note; that the American Welding Society Structural Welding Code states that low-hydrogen electrodes should be baked only once before being thrown away.)

Thanks for reading.

Ready to start your next project?
Get blog reader discount

Leave a comment 0 comments, be the first!

Please note comments must be approved before they are published.

0 Items in your cart

Subtotal $0

Tax and shipping will be calculated at checkout.

Your shopping cart is empty.