An engineering team exported Gerber files from their EDA tool, emailed them to a fabrication house, and received 50 boards two weeks later with the solder mask opening on the wrong layer. The error cost $4,200 and three weeks of schedule slip. The root cause was a mislabeled file — the top solder mask Gerber was named “Board_Bottom_Mask.gbr” and the operator loaded it on the wrong side.
Gerber files are the universal language between PCB designers and fabricators. They describe every physical layer of a printed circuit board — copper patterns, solder mask openings, silkscreen artwork, drill locations, and board outline — in a format that CNC machines and imaging equipment can interpret directly. A single naming error, missing layer, or incorrect aperture setting can turn a correct schematic into a defective board.
This guide covers the RS-274X Gerber format, the essential file layers for every PCB fabrication package, common export errors, and best practices for generating manufacturing-ready data from any EDA tool.
Extended Gerber format — the industry standard since the 1990s
Typical number of Gerber files in a 4-layer PCB fabrication package
Standard drill file format used alongside Gerber for hole data
Emerging single-file replacement for Gerber (ODB++ alternative)
What Is a Gerber File?
A Gerber file is a 2D vector image format that describes one physical layer of a printed circuit board. Each file contains a series of drawing commands — lines, arcs, flashes, and fills — that define copper traces, pads, mask openings, or silkscreen artwork. A complete PCB fabrication package consists of multiple Gerber files (one per layer) plus drill files and a fabrication drawing.
The format was originally developed by Gerber Scientific Instruments (now Ucamco) for photoplotting — the process of exposing PCB layers onto photographic film. Although modern fabrication uses laser direct imaging (LDI), the Gerber format remains the universal data exchange standard between EDA tools and PCB manufacturers worldwide.
RS-274X vs. RS-274D
RS-274D (standard Gerber) requires a separate aperture file that maps aperture codes to shapes and sizes. RS-274X (extended Gerber) embeds aperture definitions directly in the file, eliminating a major source of errors. All modern EDA tools output RS-274X by default. If your manufacturer requests RS-274D, they are using legacy equipment — always prefer RS-274X.
Essential Gerber Layers for PCB Fabrication
A minimum viable fabrication package for a 2-layer PCB requires seven files. Four-layer and six-layer boards add inner copper layers accordingly. Missing any of these files will cause the fabricator to send an engineering query — delaying your order by 1–3 days.
| Layer | File Type | What It Defines |
|---|---|---|
| Top Copper | Gerber (*.gtl) | Component-side copper traces, pads, and fills |
| Bottom Copper | Gerber (*.gbl) | Solder-side copper traces, pads, and fills |
| Top Solder Mask | Gerber (*.gts) | Openings in the top solder mask (exposing pads for soldering) |
| Bottom Solder Mask | Gerber (*.gbs) | Openings in the bottom solder mask |
| Top Silkscreen | Gerber (*.gto) | Component outlines, reference designators, and markings |
| Bottom Silkscreen | Gerber (*.gbo) | Bottom-side component markings (if needed) |
| Board Outline | Gerber (*.gko / *.gm1) | PCB edge, cutouts, and mechanical dimensions |
| Drill File | Excellon (*.drl / *.xln) | Through-hole and via locations, drill sizes |
| Inner Layer 1 | Gerber (*.g2 / *.gin) | Internal copper layer (4+ layer boards) |
| Inner Layer 2 | Gerber (*.g3 / *.gin) | Internal copper layer (4+ layer boards) |
| Paste Mask (Top) | Gerber (*.gtp) | Stencil openings for solder paste printing (for PCBA) |
"I review fabrication packages from over 200 different customers. The three most common problems, in order: missing board outline (the fabricator guesses your board shape), mislabeled layers (top and bottom swapped), and missing drill file (no holes in the board). A 60-second checklist before you hit send prevents all three."
Hommer Zhao
Founder & Technical Expert, PCB Insider
How to Generate Gerber Files from Major EDA Tools
Every major PCB design tool can export RS-274X Gerber files, but the settings and workflow differ. These are the critical settings to verify regardless of which tool you use.
Altium Designer
File → Fabrication Outputs → Gerber Files. Set format to RS-274X, units to metric or imperial (match your design), coordinate precision to 2:5 (imperial) or 4:3 (metric). Generate drill files separately via NC Drill Output.
KiCad
Plot menu (File → Plot). Select Gerber format, check “Use Protel filename extensions” for compatibility. Generate drill file from the same dialog. KiCad can also export Gerber X2 with embedded layer metadata.
Eagle (Autodesk)
CAM Processor → Load a Gerber CAM job (gerb274x.cam). Verify that each layer maps to the correct output file. Eagle uses its own file extensions — rename to standard extensions if your fab house requires them.
OrCAD / Allegro
Manufacture → Artwork. Define each film with the correct layers. Set format to Extended Gerber (RS-274X). Generate drill files via NC Drill. Allegro supports both Gerber and ODB++ output.
Always Verify: Gerber Viewers and DRC
Never send Gerber files to a fabricator without visually inspecting them in a standalone Gerber viewer. Your EDA tool shows you the design intent; the Gerber viewer shows you what the manufacturer will actually build. Discrepancies between the two indicate an export error.
Ucamco Reference Gerber Viewer
Free online viewer from the maintainers of the Gerber format. The definitive reference for how your files will be interpreted.
GerbView (KiCad)
Standalone Gerber and drill file viewer included with KiCad. Free, cross-platform, handles RS-274X and Excellon.
ViewMate (Pentalogix)
Free version available. Industry-standard viewer with layer alignment, measurement, and DRC tools.
Verify all copper layers show correct traces, pads, and fills
Check that solder mask openings align with pads on the correct side
Confirm silkscreen does not overlap exposed copper pads
Verify the board outline is a closed shape with correct dimensions
Load the drill file and confirm hole counts, sizes, and positions match your design
Check that no internal layers are accidentally swapped
Eight Common Gerber File Errors That Delay Fabrication
What Goes Wrong
- Missing or non-closed board outline layer
- Swapped top/bottom layers (mirrored board)
- Missing or mismatched drill file
- Solder mask layer exported as negative instead of positive (or vice versa)
How to Prevent It
- Always include a dedicated board outline Gerber (*.gko or *.gm1)
- Place an asymmetric marker (e.g., text “TOP”) to verify orientation
- Generate drill files from the same design session as Gerbers
- Verify polarity in a Gerber viewer — pads should be visible, not inverted
"The number one thing designers can do to speed up fabrication is include a fabrication note — a text file or PDF that specifies stack-up, copper weight, surface finish, solder mask color, impedance requirements, and IPC class. Without it, we have to email questions and wait for answers. With it, we can start tooling the same day the files arrive."
Hommer Zhao
Founder & Technical Expert, PCB Insider
What to Include in Your Fabrication Notes
A fabrication note (also called a README, fab drawing, or spec sheet) accompanies your Gerber package and tells the manufacturer everything the Gerber files do not encode. Include it as a PDF in the same ZIP file as your Gerbers.
The Future: Gerber X2 and IPC-2581
The traditional Gerber format has a fundamental limitation: it describes geometry without context. A Gerber file does not know whether it represents a copper layer or a solder mask — that information is conveyed only through filenames and documentation. Two newer formats address this limitation.
Gerber X2
An extension of RS-274X that adds structured metadata attributes — layer type, polarity, copper weight, and function. The file format is backward-compatible: X2 files render correctly in any RS-274X viewer, while X2-aware tools can read the embedded metadata.
IPC-2581 / ODB++
Single-file formats that encode the entire PCB design — all layers, drill data, stack-up, netlist, and BOM — in one structured file. Eliminates multi-file coordination errors entirely. IPC-2581 is an open standard; ODB++ is Siemens-maintained.
"Gerber X2 is the pragmatic next step for most designers. It eliminates the ‘which layer is this?’ problem without requiring your fab house to support an entirely new format. If your EDA tool supports X2 export, enable it — it costs you nothing and saves your manufacturer from guessing."
Hommer Zhao
Founder & Technical Expert, PCB Insider
References
- Ucamco — The Gerber Layer Format Specification (RS-274X / Gerber X2). ucamco.com
- IPC-2581 — Generic Requirements for Printed Board Assembly Products Manufacturing Description Data and Transfer Methodology. IPC Standards
- Excellon Format — Numerical Control drill file standard for PCB manufacturing.
- IPC-2221B — Generic Standard on Printed Board Design (fabrication requirements and layer definitions).
Frequently Asked Questions
What is a Gerber file in PCB manufacturing?
A Gerber file is a 2D vector image file that describes one physical layer of a PCB — copper traces, solder mask openings, silkscreen artwork, or board outline. A complete PCB fabrication package consists of multiple Gerber files (one per layer) plus drill files. The standard format is RS-274X (Extended Gerber).
How many Gerber files do I need for a 4-layer PCB?
A typical 4-layer PCB requires 10–12 files: 4 copper layers, 2 solder mask layers, 1–2 silkscreen layers, 1 board outline, 1–2 drill files, and optionally 1–2 paste mask layers for assembly. Some manufacturers also want a fabrication note PDF.
What is the difference between Gerber and Excellon files?
Gerber files describe 2D images (copper, mask, silkscreen), while Excellon files describe drill operations (hole locations, sizes, and types — plated vs. non-plated). Both are required for fabrication. They are separate formats because they drive different CNC machines — imaging equipment for Gerber and drill presses for Excellon.
Can I open a Gerber file to see what’s in it?
Yes — use a free Gerber viewer like GerbView (KiCad), ViewMate (Pentalogix), or the Ucamco Reference Gerber Viewer online. You should always visually inspect your Gerber files before sending them to a manufacturer to catch export errors, missing layers, and polarity issues.
What is Gerber X2?
Gerber X2 is an extension of the RS-274X format that adds structured metadata attributes to each file — layer type, polarity, function, and copper weight. It is backward-compatible with RS-274X viewers but helps manufacturers automatically identify and assign layers without relying on filenames.
Should I use ODB++ instead of Gerber?
ODB++ and IPC-2581 are single-file formats that encode the entire PCB design, eliminating multi-file coordination errors. They are supported by large-volume manufacturers but not yet universal. If your fab house accepts ODB++, it can reduce errors — but always have Gerber files as a fallback.
Ready to Send Your Gerber Files for Fabrication?
Upload your Gerber package and get an instant DFM check plus a competitive quote. Our engineering team reviews every file set before production to catch errors early and save you time.
Get a PCB Fabrication Quote