PCB

Gerber files

By CourseTron Team ·  7 min read ·  Updated Oct 2026 💬 𝕏 in f
Table of Contents
    ? Print / Save as PDF

    In short: Gerber files are the standardized, layer-by-layer vector drawings (today the Gerber X2 / RS-274X format) that tell a PCB fabricator exactly where to deposit copper, solder mask, silkscreen and solder paste, and where to drill — one file per physical layer, drawn from a dictionary of apertures.

    When your schematic and layout are finished, the board does not travel to the fab as a single mysterious binary. It travels as a folder of plain-text Gerber files, one per manufacturing layer, plus drill data. Understanding that folder is the difference between a clean first article and a week of back-and-forth emails from the CAM engineer. This is one of the most interview-relevant topics in PCB work precisely because it sits at the boundary between design intent and physical reality.

    Why Gerber exists at all

    A fab house runs equipment from dozens of vendors — laser photoplotters, LDI (laser direct imaging) exposers, CNC drills, AOI stations. None of them read your EDA tool's native database. Gerber is the neutral interchange format that every CAM package (Ucamco's UcamX, Siemens' Valor NPI, DownStream CAM350) can ingest. The original RS-274D was "dumb" — the aperture list lived in a separate file. The modern RS-274X (Extended Gerber) embeds apertures inline, and Gerber X2 (2014) adds attributes that label each file's function so the fab no longer has to guess which file is the top copper.

    Gerber is a 2D vector format. It describes regions and strokes, not pixels. A 6-layer board that is physically tiny can still produce a Gerber set that plots at any resolution, because everything is coordinates and aperture definitions, not a raster image.

    One file per layer: the layer stack

    The core idea: each physical process step gets its own file. A typical 2-layer board exports roughly eight files, and a 6-layer board many more. The extensions are conventions (Protel/Altium style shown below), though X2 attributes are the authoritative way to identify them.

    LayerTypical ext.What the fab does with it
    Top copper.GTLImage + etch copper on component side
    Bottom copper.GBLImage + etch copper on solder side
    Top solder mask.GTSOpenings where mask is removed (pads)
    Bottom solder mask.GBSSame, reverse side
    Top silkscreen.GTOLegend: refdes, polarity, logos
    Top paste / stencil.GTPStencil apertures for SMT reflow
    Board outline.GKO / .GM1Route/profile the board edge
    Drill data.DRL (Excellon)Hole positions + tool sizes (NC drill)
    Layer stack to Gerber files Silkscreen (.GTO)Solder mask (.GTS)Top copper (.GTL)FR-4 dielectric coreBottom copper (.GBL)Solder mask (.GBS) 1 layer = 1 Gerberimage file + Excellon drill (.DRL), holes CourseTron · coursetron.com
    Each physical layer of the stack maps to exactly one Gerber image; holes ship separately as Excellon drill data.

    Apertures: the "pens and stamps" of Gerber

    Everything in a Gerber file is drawn with an aperture — think of it as the shape of the pen tip or the rubber stamp. You define a dictionary of apertures at the top (%ADD10C,0.25*% defines aperture D10 as a 0.25 mm round circle), then select one (D10*) and move the plotter.

    • Flash (D03): stamp the aperture once at a coordinate — used for pads. A 0.6 mm round pad is a single flash of a 0.6 mm circle aperture.
    • Draw (D01): drag the aperture along a path — used for traces. A 0.2 mm trace is a draw with a 0.2 mm round aperture.
    • Move (D02): lift the pen and reposition without drawing.

    Standard aperture templates are Circle (C), Rectangle (R), Obround (O) and Polygon (P); macros (%AM) let you build arbitrary shapes like thermal reliefs or rotated chamfered pads. Copper pours and planes are drawn as filled regions (G36/G37) rather than thousands of overlapping draws — a change that shrank plane files dramatically versus the old "painted" style.

    Flash, draw, flash D03 flash D01 draw 0.2 mm trace D03 flash Orange = flashed pads (stamp once). Cyan = trace drawn by dragging the aperture. CourseTron · coursetron.com
    The plotter flashes an aperture to make a pad, then drags it to draw a trace — exactly how the photoplotter images the layer.

    What the fab actually needs from you

    A complete, unambiguous data package is what gets you a fast quote. CAM engineers consistently flag the same gaps:

    • All copper layers in the right order, plus mask, paste and silk for the sides you need.
    • A board outline on its own layer — never inferred from copper. Ambiguous outlines are the #1 cause of fab queries.
    • Excellon drill files with plated (PTH) and non-plated (NPTH) holes distinguished, and the tool table included.
    • Units and format header: metric vs imperial, and the coordinate format (e.g. %FSLAX46Y46*% = 4 integer, 6 decimal digits). A wrong format turns a 10 mm trace into 100 mm.
    • A README / fab drawing: stackup, finished thickness, copper weight (e.g. 1 oz = 35 µm), impedance targets, surface finish (ENIG/HASL).
    Reading %FSLAX46Y46*% Example coordinate: X0012500000 0012500000 4 integer digits 6 decimal digits 0012.500000 = 12.5 mm (with metric units, %MOMM*%) A wrong digit count shifts the decimal point: 10 mm becomes 100 mm. CourseTron · coursetron.com
    The %FS header sets how many integer and decimal digits each coordinate carries; 4.6 means four before and six after the decimal point.

    The modern alternative is Gerber X2 plus the embedded job attributes, or the newer IPC-2581 format, which carry the stackup and netlist in one file — eliminating the "which file is which" guesswork that plagues bare RS-274X sets.

    Gerber sits near the end of the PCB design flow, right after layout and DRC. If you are still deciding trace widths and clearances, review trace-width and current-capacity rules before you export, because those constraints bake straight into the aperture sizes. For teams that want a hardware house to own the layout and the Gerber generation end-to-end, Avecas design services is a good reference point for how a professional handoff package is assembled.

    Common mistakes that cost you a respin

    • Missing drill file — Gerbers alone have no holes; the board comes back un-drilled.
    • Solder mask slivers — mask expansion smaller than the fab's minimum dam, so the mask between fine-pitch pads flakes off.
    • Silk on pads — legend text clipped onto exposed copper; it either gets removed or contaminates the joint.
    • Mirrored bottom layers — exporting the bottom side mirrored when the fab expects "as viewed from top," flipping your footprint.

    Want to go from schematic to a fab-ready Gerber package you can trust? CourseTron's PCB design track walks you through layout, DRC, and a verified export checklist with real board houses. Explore the PCB courses →

    Frequently asked questions

    Is Gerber still the industry standard in 2026?

    Yes. Gerber X2 remains the dominant handoff format worldwide, with IPC-2581 and ODB++ growing where a single intelligent file (with netlist and stackup) is preferred. Most fabs accept all three; Gerber X2 is still the safest lowest-common-denominator.

    Do I send one Gerber file or many?

    Many — one image file per manufacturing layer, plus Excellon drill files. Some tools can bundle them into a single X3/job archive, but conceptually it is always one layer, one file.

    What is the difference between a draw and a flash?

    A flash stamps an aperture once to create a pad or via; a draw drags the aperture along a path to create a trace. Both use the same aperture dictionary.

    Why do my dimensions look 10× or 100× wrong?

    Almost always a coordinate-format or units mismatch in the %FS and %MO headers. Confirm the integer/decimal digit count and metric vs imperial before sending.

    Advertisement