Contact Sales & After-Sales Service

Contact & Quotation

  • Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.
  • Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.
Drag & Drop Files, Choose Files to Upload You can upload up to 3 files.

Notes:
For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.

Best Practices for Gerber File Output Settings: PCB Engineer’s Complete Guide

Getting Gerber file output settings wrong is one of the fastest ways to delay a PCB project. I’ve seen boards come back with misaligned drill holes, inverted solder masks, and features scaled to the wrong size—all because of incorrect export settings. The frustrating part is that these errors are entirely preventable. This guide covers the best practices for Gerber file output settings that ensure your designs translate correctly from CAD to fabrication every single time.

Why Gerber File Output Settings Matter

Your Gerber files are the manufacturing blueprint for your PCB. Every setting you choose during export—coordinate format, units, zero suppression, aperture handling—directly affects how the manufacturer interprets your design. Get these settings wrong, and features end up in the wrong locations, traces appear at incorrect widths, or layers simply don’t align.

Impact of Incorrect Output Settings

Setting ErrorConsequenceTypical Symptom
Wrong coordinate formatFeatures scaled incorrectlyBoard appears 10x larger or smaller
Mismatched zero suppressionCoordinate misinterpretationDrill holes offset from pads
Incorrect unitsDimensional errors25.4x scaling (inch vs mm confusion)
Missing aperture definitionsUnknown feature shapesPads and traces render incorrectly
Wrong layer polarityInverted masksSolder mask covers pads instead of openings

The good news is that once you understand these settings and configure them correctly, you can save your export configuration and reuse it for every project.

Choosing the Right Gerber Format Version

Before adjusting any other settings, select the appropriate Gerber format version. This fundamental choice affects compatibility and data completeness.

Gerber Format Comparison

FormatReleasedAperturesAttributesRecommendation
RS-274D1960sExternal file requiredNoneAvoid—obsolete
RS-274X1990sEmbedded in fileLimitedIndustry standard—use this
Gerber X22014Embedded in fileFull layer/function dataUse if manufacturer supports
Gerber X32019Embedded in fileExtended attributesLimited adoption

Best practice: Export in RS-274X format unless your manufacturer specifically requests Gerber X2. RS-274X is self-contained (no separate aperture files needed) and universally supported. If your CAD tool supports X2, you can export in both formats to maximize compatibility.

RS-274X vs RS-274D: Why It Matters

RS-274D required a separate aperture list file that defined all pad shapes and sizes. If this file was missing, mismatched, or corrupted, the Gerber data became unreadable—the manufacturer had no way to know what shapes to draw. RS-274X solved this by embedding aperture definitions directly in each Gerber file. Always verify your export uses “Embedded apertures (RS-274X)” rather than external aperture files.

Coordinate Format Settings

The coordinate format defines how numerical precision is expressed in your Gerber files. This setting must match between Gerber files and drill files to ensure proper alignment.

Understanding Coordinate Format Notation

Coordinate format is expressed as X:Y where X is integer digits and Y is decimal digits.

FormatTotal DigitsResolution (inches)Resolution (mm)Common Use
2:350.001″ (1 mil)0.001mmLegacy, low precision
2:460.0001″ (0.1 mil)0.0001mmStandard imperial
2:570.00001″ (0.01 mil)0.00001mmHigh precision imperial
3:36N/A0.001mmStandard metric
4:59N/A0.00001mmHigh precision metric

Best practice: Use 2:5 format for metric units or 2:4 format for imperial units. These provide sufficient precision for modern manufacturing tolerances including fine-pitch components and HDI designs. Always confirm your manufacturer supports your chosen format before exporting.

Matching Format Across All Files

A critical requirement: Gerber files and NC drill files must use the same coordinate format. If your Gerbers use 2:5 and your drill files use 2:4, drill holes will appear offset from their intended positions.

File TypeRecommended Format (Metric)Recommended Format (Imperial)
Copper layers2:5 or 4:52:4 or 2:5
Solder mask2:5 or 4:52:4 or 2:5
Silkscreen2:5 or 4:52:4 or 2:5
Board outline2:5 or 4:52:4 or 2:5
NC drill filesSame as GerbersSame as Gerbers

Unit Settings: Inches vs Millimeters

Choose either inches or millimeters and use that unit consistently across all output files. Mixing units is a common source of manufacturing errors.

Unit Selection Guidelines

ScenarioRecommended UnitReason
Designs in metric CADMillimetersMaintains native precision
Designs in imperial CADInchesMaintains native precision
Working with Asian manufacturersMillimetersPreferred by most Asian fabs
Legacy designs from US sourcesInchesMatches original design intent
High-precision RF/microwaveMillimetersFiner resolution available

Best practice: If your PCB design was created in millimeters, export Gerbers in millimeters. Converting units during export can introduce rounding errors, especially for features on non-standard grids.

Verifying Unit Consistency

Before sending files to manufacturing, verify unit consistency:

  1. Open each Gerber file in a text editor
  2. Look for the format statement (e.g., %MOIN*% for inches or %MOMM*% for millimeters)
  3. Confirm all files use the same unit declaration
  4. Verify drill files use matching units

Zero Suppression Settings

Zero suppression determines how coordinate numbers are formatted by removing unnecessary zeros. This setting must be interpreted correctly by the receiving CAM software.

Zero Suppression Options Explained

SettingEffectExample (coordinate 15.2500)
Suppress leading zerosRemoves zeros before significant digits152500
Suppress trailing zerosRemoves zeros after significant digits1525
Keep all zerosNo suppression00152500
Explicit decimalUses actual decimal point15.2500

Best practice: Use “Suppress leading zeros” for Gerber files—this is the most widely supported option. For drill files, match the zero suppression setting to your Gerber files. Some CAD tools default to trailing zero suppression, which can cause interpretation errors at the manufacturer.

Zero Suppression Format Statement

In RS-274X files, the format statement indicates zero suppression:

  • %FSLAX24Y24*% = Leading zeros suppressed, absolute coordinates, 2:4 format
  • %FSTAX24Y24*% = Trailing zeros suppressed, absolute coordinates, 2:4 format

Always verify this statement matches your intended setting.

Aperture Settings

Apertures define the shapes used to draw pads, traces, and other features. Proper aperture configuration ensures features render at correct sizes.

Essential Aperture Settings

SettingRecommended ValuePurpose
Aperture formatEmbedded (RS-274X)Self-contained files
Flash aperturesEnabledDiscrete pads render correctly
Vector aperturesAvoid when possibleCan cause interpretation issues
Aperture matching tolerance0.001mm or tighterPrevents duplicate apertures

Best practice: Always enable “Embedded apertures (RS-274X)” in your export settings. This eliminates the need for separate aperture files and prevents aperture mismatch errors. Avoid using vector (drawn) apertures for pads—use flash apertures instead for cleaner, more reliable results.

Aperture Table Optimization

Some CAD tools generate excessive aperture definitions, creating unnecessarily large files. Configure your export to:

  • Merge identical apertures
  • Remove unused aperture definitions
  • Use standard aperture shapes when possible

Layer-Specific Output Settings

Different layer types require specific attention during export.

Copper Layer Settings

SettingValueNotes
PolarityPositive (dark)Standard for copper layers
Include thermal reliefsYesRequired for proper plane connections
Include test pointsPer designExport if present in design
Plot modeFilledNot outline mode

Solder Mask Settings

SettingValueNotes
PolarityNegativeDrawn areas = mask openings
Include via openingsPer designDepends on tenting requirements
ExpansionAs designedDon’t modify during export

Critical: Solder mask polarity causes more manufacturing issues than almost any other setting. Verify your solder mask files show openings where pads should be exposed, not the inverse.

Silkscreen Settings

SettingValueNotes
PolarityPositive (dark)Drawn areas = ink applied
Clip to board outlineRecommendedPrevents ink outside board edge
Remove overlaps with padsRecommendedPrevents solder issues

Board Outline Settings

SettingValueNotes
Line width0.1mm or as specifiedDefines routing path center
Closed contourRequiredOutline must form complete loop
Include cutoutsYesInternal routing paths

NC Drill File Output Settings

Drill files require their own careful configuration to match Gerber data.

Essential Drill File Settings

SettingRecommended ValueNotes
FormatExcellonIndustry standard
UnitsSame as GerbersCritical for alignment
Coordinate formatSame as GerbersCritical for alignment
Zero suppressionSame as GerbersCritical for alignment
Tool definitionsEmbedded in headerSelf-contained file

PTH and NPTH Separation

ConfigurationWhen to Use
Separate filesManufacturer requires separate plated/non-plated
Single merged fileManufacturer accepts combined, reduces missing file risk
With slot fileIf design includes routed slots

Best practice: Check your manufacturer’s requirements. Many modern fabs accept merged PTH/NPTH files, which reduces the risk of forgetting to include one file. If separating, clearly name files to indicate plated vs. non-plated.

CAD-Specific Output Configuration

Different CAD tools have different default settings and export workflows.

Altium Designer Settings

SettingLocationRecommended Value
FormatGeneral tab2:5 (metric) or 2:4 (imperial)
AperturesApertures tabEmbedded apertures (RS-274X)
Zero suppressionGeneral tabSuppress leading zeros
Film sizeAdvanced tabMatch board dimensions + margin
OriginGeneral tabReference to relative origin

KiCad Settings

SettingLocationRecommended Value
Plot formatPlot dialogGerber
Coordinate formatPlot dialog4.6 (mm)
Use extended X2Plot dialogEnable if manufacturer supports
Subtract soldermaskPlot dialogEnable
Drill formatDrill dialogExcellon
Drill unitsDrill dialogSame as Gerber

Eagle Settings

SettingLocationRecommended Value
Output formatCAM ProcessorRS-274X
Wheel/aperturesCAM ProcessorEmbedded
Position offsetCAM Processor0,0 or board origin
OptimizeCAM ProcessorEnable

Pre-Export Checklist

Complete these checks before generating Gerber files.

Design Verification

CheckAction
Run DRCResolve all errors, review warnings
Verify connectivityCheck for unrouted nets
Check zone fillsRefill all copper pours
Verify board outlineConfirm closed contour exists
Review layer stackupConfirm correct layer count and order

Export Configuration

CheckAction
Format versionRS-274X or X2 as required
UnitsConsistent across all files
Coordinate formatSame for Gerbers and drills
Zero suppressionSame for Gerbers and drills
Layer selectionAll required layers included

Post-Export Verification

Never send Gerber files to manufacturing without verification.

Verification Steps

StepToolWhat to Check
Visual inspectionGerber viewerAll layers present and correct
Layer alignmentGerber viewerOverlay copper and drill layers
Drill alignmentGerber viewerHoles center on pads
Board dimensionsGerber viewerCorrect size and shape
Feature sizesGerber viewerTraces and pads at expected widths
DFM checkManufacturer toolDesign rule compliance

Recommended Verification Tools

ToolTypeFeatures
GerbvFree, open sourceLayer viewing, measurement
KiCad GerbViewFree, open sourcePart of KiCad suite
ViewMateFree (basic)Professional viewer
CAM350CommercialFull CAM functionality
HQDFMOnline, freeDFM checking
Manufacturer viewersOnline, freeJLCPCB, PCBWay, etc.

Useful Resources

Gerber Specification Documents

ResourceSourceURL
Gerber Format SpecificationUcamcoucamco.com/gerber
Excellon Format ReferenceIndustry standardVarious sources
IPC-D-356 Netlist StandardIPCipc.org

CAD Software Documentation

SoftwareDocumentation URL
Altium Designeraltium.com/documentation
KiCaddocs.kicad.org
Eagle/Fusion 360autodesk.com/support
OrCADcadence.com/support

Manufacturer Guidelines

ManufacturerGuidelines URL
JLCPCBjlcpcb.com/help
PCBWaypcbway.com/blog
OSH Parkdocs.oshpark.com
Eurocircuitseurocircuits.com/help

Frequently Asked Questions

What coordinate format should I use for high-density designs?

For HDI and fine-pitch designs (0.4mm pitch BGAs, 3/3 mil traces), use 2:5 format with metric units. This provides 0.00001mm resolution, sufficient for features down to 0.05mm (2 mil). The 2:4 format may not provide adequate precision for these designs. Always verify your manufacturer supports your chosen format—some budget services have equipment limitations that restrict format options.

Why do my drill holes appear offset from pads in the Gerber viewer?

This almost always indicates a mismatch between Gerber and drill file settings. Check three things: First, verify both files use the same units (inches or mm). Second, confirm the coordinate format matches (both should be 2:4 or both 2:5). Third, check zero suppression settings—if Gerbers use leading zero suppression and drill files use trailing, coordinates will be misinterpreted. Re-export both file types with identical settings.

Should I use Gerber X2 format instead of RS-274X?

Use Gerber X2 if your manufacturer supports it and your CAD tool exports it reliably. X2 adds layer function attributes that help CAM software automatically identify layer types (top copper, bottom solder mask, etc.), reducing manual interpretation and errors. However, RS-274X remains universally supported, so if you’re unsure about X2 compatibility, stick with RS-274X. Some engineers export both formats as a safeguard.

What’s the difference between leading and trailing zero suppression?

Zero suppression removes unnecessary zeros from coordinate numbers to reduce file size. Leading zero suppression removes zeros from the beginning (00152500 becomes 152500), while trailing suppression removes them from the end (15250000 becomes 1525). The receiving software must know which method was used to correctly interpret coordinates. Leading zero suppression is more common and widely supported—use it unless your manufacturer specifically requires trailing suppression.

How do I verify my solder mask polarity is correct?

Open your solder mask Gerber file in a viewer and compare it to your copper layer. Pad locations should appear as openings (clear areas) in the solder mask, not as filled areas. If pads appear solid in the solder mask file, your polarity is inverted. Most CAD tools export solder mask as negative polarity (drawn areas = openings), but some viewers display this differently. The safest check is overlaying solder mask on copper—openings should exactly match pad locations where you want exposed copper.

Conclusion

Proper Gerber file output settings form the foundation of successful PCB manufacturing. The settings covered in this guide—format version, coordinate format, units, zero suppression, and aperture configuration—must be correct and consistent across all files. Get these right, and your boards will manufacture exactly as designed.

The most important takeaways: use RS-274X format with embedded apertures, maintain identical coordinate format and units between Gerber and drill files, use leading zero suppression, and always verify your output before sending to manufacturing. Save your export configuration once it’s working correctly, and you’ll eliminate this source of errors for future projects.

Take the extra time to verify your Gerber files in a viewer before every manufacturing order. The few minutes spent checking alignment, dimensions, and layer content can save days of delay and significant cost when problems are caught before fabrication instead of after.

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Sales & After-Sales Service

Contact & Quotation

  • Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.

  • Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.

Drag & Drop Files, Choose Files to Upload You can upload up to 3 files.

Notes:
For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.