· AtlasPCB Engineering · Engineering  · 5 min read

PCB Gerber Files: What They Are and How to Generate Them

Understand PCB Gerber files — the RS-274X format, ODB++, which layers to include, how to generate them from KiCad, Altium, and Eagle, and common mistakes to avoid.

Understand PCB Gerber files — the RS-274X format, ODB++, which layers to include, how to generate them from KiCad, Altium, and Eagle, and common mistakes to avoid.

Gerber files are the universal language between PCB designers and manufacturers. Getting them right is essential for a smooth fabrication process. This guide explains what Gerber files are, which files you need, and how to generate them correctly.


What Are Gerber Files?

Gerber files are 2D vector image files that describe each layer of a PCB. Each file represents one layer — copper traces, solder mask, silkscreen, paste stencil, etc. The manufacturer’s CAM (Computer-Aided Manufacturing) software reads these files to produce photomasks, drill programs, and other fabrication tools.

Format History

  • RS-274D (Standard Gerber): Legacy format with separate aperture files. Mostly obsolete.
  • RS-274X (Extended Gerber): Current industry standard. Aperture definitions embedded in the file. Self-contained and unambiguous.
  • Gerber X2: Extension of RS-274X with file attributes (layer type, polarity, function). Increasingly adopted.
  • Gerber X3: Adds component information. Still emerging.

Always use RS-274X or X2. If your manufacturer requests RS-274D, find a new manufacturer.


Which Files Do You Need?

Standard File Set for a 4-Layer Board

FileLayerExtension (typical)
Top CopperFront copper traces.GTL
Inner Layer 2Ground/power plane.G2 or .GP1
Inner Layer 3Power/signal.G3 or .GP2
Bottom CopperBack copper traces.GBL
Top Solder MaskFront solder mask.GTS
Bottom Solder MaskBack solder mask.GBS
Top SilkscreenFront component labels.GTO
Bottom SilkscreenBack component labels.GBO
Top PasteStencil for SMT paste.GTP
Bottom PasteStencil for SMT paste.GBP
Board OutlineBoard edge definition.GKO or .GM1
Drill File (PTH)Plated through-holes.DRL or .XLN
Drill File (NPTH)Non-plated holes.DRL or .XLN

Additional Files

  • Fabrication drawing: Dimensions, tolerances, stackup, notes (.GFB or PDF)
  • Netlist (IPC-D-356): Electrical netlist for bare board testing
  • Pick and place file: Component X/Y coordinates for SMT assembly
  • BOM (Bill of Materials): Component list for procurement and assembly

Drill Files

Drill files use the Excellon format (also called NC Drill). They specify:

  • Hole locations (X, Y coordinates)
  • Hole diameters (tool list)
  • Hole types: Plated (PTH) vs Non-Plated (NPTH)
  • Drill sequence

Important Settings

  • Format: Excellon (2:4 or 2:5 format — 2 integer digits, 4 or 5 decimal digits)
  • Units: Metric (mm) preferred; inches also common
  • Zero suppression: Leading zero suppression or trailing — must match the file
  • Coordinates: Absolute (preferred) or incremental
  • Separate files for PTH and NPTH — critical! Non-plated holes must not be copper-plated

Need Complex PCB Manufacturing?

Up to 68 layers, 3-stage HDI, Rogers/PTFE substrates. 12-hour engineering review on every order.

Get Instant Quote →
Complex multilayer PCB board stack

KiCad

  1. Open PCB Editor → File → Fabrication Outputs → Gerbers
  2. Select all copper layers + mask + silk + edge cuts + paste
  3. Format: Gerber X2 (recommended)
  4. Coordinate format: 4.6 (metric)
  5. Generate drill files separately: File → Fabrication Outputs → Drill Files
  6. Format: Excellon, Metric, PTH and NPTH in separate files

Altium Designer

  1. File → Fabrication Outputs → Gerber Files
  2. Configure layers in the dialog
  3. Format: RS-274X
  4. Units: Metric
  5. Apertures: Embedded
  6. File → Fabrication Outputs → NC Drill Files (for drill data)

Eagle

  1. CAM Processor → Load a Gerber job file (or create new)
  2. Add all required layers
  3. Device: GERBER_RS274X
  4. Generate drill file with EXCELLON device
  5. Export and verify

ODB++ as an Alternative

ODB++ is a comprehensive single-database format that contains ALL manufacturing data (copper, mask, drill, netlist, stackup, BOM) in one package.

Advantages Over Gerber

  • Single file instead of 15-20 separate files
  • Includes netlist information (Gerber doesn’t)
  • Includes stackup and material specification
  • Less room for file mismatch errors
  • Increasingly supported by manufacturers

When to Use ODB++

  • When your manufacturer supports it (ask first)
  • For complex boards with many layers
  • When you want to minimize file management errors

Common Gerber Mistakes

1. Missing Board Outline

Without a clear board outline layer, the manufacturer doesn’t know the board shape. Always include a board outline on a dedicated layer (mechanical layer or edge cuts).

2. Wrong Drill File Format

Metric vs imperial mismatch causes holes to be drilled at wrong locations. Always verify units match between Gerber and drill files.

3. Missing Layers

Forgetting to export inner layers, paste layers, or the board outline. Always cross-check your file set against the standard file list.

4. Incorrect Solder Mask Polarity

Solder mask Gerbers can be positive (dark = mask) or negative (dark = opening). Most manufacturers expect positive polarity. Verify by opening in a Gerber viewer.

5. Non-Plated Holes Mixed with Plated

If NPTH and PTH holes are combined in one drill file, the manufacturer may plate holes that should remain unplated (or vice versa). Always generate separate files.

6. Stale/Outdated Files

Re-generate Gerbers every time you make a design change. Don’t send files from an older revision.


Verification Before Sending

Use a Gerber Viewer

Before submitting files, always review them in an independent Gerber viewer:

  • Free: KiCad’s GerbView, gerbv, Tracespace.io (online)
  • Commercial: CAM350, ViewMate

Verification Checklist

  1. All copper layers present and correct
  2. Solder mask openings align with pads
  3. Silkscreen doesn’t overlap pads
  4. Board outline is closed and correct dimensions
  5. Drill holes align with pads
  6. PTH and NPTH are in separate files
  7. No stray artifacts or test objects
  8. Layer count matches your design

Conclusion

Generating correct Gerber files is a critical skill for every PCB designer. Use RS-274X or X2 format, always include complete drill files, verify in an independent viewer, and double-check your file set against the standard list. A few minutes of verification prevents days of delay from manufacturing errors.

Further Reading

  • gerber files
  • pcb design
  • manufacturing data
  • CAD
Share:
Back to Blog

Related Posts

View All Posts »