What is a Gerber File? — RS-274X, Excellon & X2 Explained

The Handoff Format Every Fabricator Speaks
If you've ordered a PCB, you've zipped a folder full of cryptic extensions — .gtl, .gbl, .gto, .drl — and emailed it to a fab house. Those are Gerber files. They're the universal language between PCB design tools (KiCad, Altium, Eagle, EasyEDA) and manufacturing machines (photoplotters, drill presses, pick-and-place heads). No Gerber, no board. Here's what's actually inside them and why the format has survived for 40+ years.
What's Actually Inside a Gerber File
Each Gerber file is a plain-text stream of 2D drawing commands (RS-274X format) describing a single PCB layer — top copper, bottom copper, top silkscreen, solder mask, and so on. Think of it as the manufacturing equivalent of a vector PDF: aperture definitions (D-codes) say what shape to stamp (round pad? square? rectangle?), and coordinate commands (G/M codes) say where to stamp them. Open one in Notepad and you'll see lines like G01X1000Y2000D01 — draw a line from the current position to (1,2) mm. That's it. The whole file is just a list of stamps and paths.
What the Format Guarantees
- One file per layer — top copper, bottom copper, each inner copper, top/bottom silkscreen, top/bottom solder mask, board outline. A 2-layer board ships 8–10 files. A 12-layer HDI board can push past 20.
- Excellon for drills — a separate plain-text format (not technically Gerber) for drill-hit coordinates and tool sizes. Plated and non-plated holes usually split into two files.
- RS-274X vs X2 — RS-274X (1998) is the baseline every fab reads. Gerber X2 (2014) is a superset that embeds layer function, net names, and component data so CAM tools do automatic DFM. Modern KiCad/Altium default to X2.
- Plain text and vendor-neutral — any editor can read a Gerber, any CAM tool can consume one. There's no proprietary binary format, no vendor lock-in, no licensing fee.
- Metric or imperial — the format supports both via the %MO directive. Most Western fabs use imperial (mils), most Asian fabs accept either. Mixing up units is the #1 cause of scale errors.
- Pick-and-place (CPL) is separate — X/Y rotation and component reference travel in a centroid file alongside the Gerber, not inside it. Assembly houses need both.
How to Work With Gerbers
- Open pcbviewer.app — drop your Gerber zip (no extraction needed) onto the viewer.
- Check the layer stack — top copper, silkscreen, solder mask should render crisply. If a layer is flipped or mirrored, your export settings are wrong.
- Verify drill hits land on pads — misaligned drills come back as holes punched through traces. The 3D view makes this impossible to miss.
- Check the board outline — an unclosed outline polygon forces the fab to guess the board edge, usually resulting in a rectangular fallback.
- Zip and send — most fabs accept a zipped folder with all layer files plus Excellon drill files. Include a README listing stackup and net count for complex boards.
Drop a Gerber zip — see your PCB in 3D before you ship it to the fab.
Try MakerSuite 3D FreeWhy Gerber Still Wins After 40 Years
Gerber is plain text, vendor-neutral, human-readable, and every PCB fab on Earth supports it. Attempts to replace it — IPC-2581, ODB++ — have richer metadata but require licensed tooling or vendor buy-in, so they've stayed niche. Meanwhile RS-274X export is a checkbox in every EDA tool, and the file you export today will open in a CAM station 20 years from now. The format's boring reliability is exactly why it won.
When You'll Meet Gerber Files
- Ordering prototypes from JLCPCB, PCBWay, OSH Park — every fab wants a Gerber zip upload
- DFM review before committing to volume — CAM engineers run your Gerbers through DRC to flag tolerance issues
- Stencil manufacturing — laser-cut SMD stencils are driven by the paste-layer Gerber
- Archiving a design you no longer have source for — Gerbers reverse-engineer back to a rough board with any EDA tool
- Cross-checking a third-party layout — even without the source project, you can load their Gerbers and verify before paying the fab
Why a Browser Viewer for Gerbers
Your Gerber zip contains your board's full IP — every trace, every component position, every net name. Uploading to a cloud viewer is a red flag for anything pre-launch or under NDA. MakerSuite 3D parses RS-274X and Excellon entirely in your browser via pure JavaScript — no server, no upload, no queue. The file you drop never leaves the tab. Same parsing logic fabricators use internally, just ported to run client-side.
Frequently Asked Questions
What exactly is inside a Gerber file?
Each Gerber file is a plain-text stream of 2D drawing commands (RS-274X format) describing a single PCB layer — the top copper, bottom copper, top silkscreen, solder mask, etc. Think of it as the manufacturing equivalent of a vector PDF: aperture definitions (D-codes) say what shapes to stamp, and coordinate commands say where to stamp them. A complete board is a folder of these files, usually zipped together with an Excellon drill file.
How many Gerber files does one PCB need?
A typical 2-layer board ships with 8–10 files: top and bottom copper, top and bottom solder mask, top and bottom silkscreen, board outline, and one or two Excellon drill files (plated and non-plated holes). A 4-layer board adds the inner copper layers. A complex 12-layer HDI board can push past 20 files.
What's the difference between Gerber X2 and RS-274X?
RS-274X (from 1998) is the baseline format that every manufacturer reads. Gerber X2 (2014) is a superset that embeds metadata — layer function, net names, component attributes — so CAM tools can do automatic panelization and DFM. Our viewer reads both, and modern KiCad/Altium default to X2. If your fabricator complains, export as plain RS-274X.
Can I view Gerber files without installing KiCad or Altium?
Yes — drop your Gerber zip onto MakerSuite 3D. The parser runs in your browser, renders all layers with aperture shapes, composites the board in 3D, and shows drill hits and board outline together. No CAM software, no login, no upload. The same RS-274X parser is what fabricators use internally, just ported to JavaScript.
Are Gerber files editable?
Technically yes (they're plain text), but practically no — hand-editing aperture tables and coordinate streams is how you ship a $10k fab mistake. If you need to change the board, edit the source (KiCad, Altium, EasyEDA) and re-export. Gerber is an output-only handoff format, not a working file.
Related Articles
Drop your Gerber zip — see every layer in 3D
Launch Gerber Viewer