What is a Gerber File in PCB Design and Manufacturing?
A Gerber file, named after the Gerber Systems Corp. that created the file format, is the standard file format used in printed circuit board (PCB) design and manufacturing. It is a 2D vector image file format that contains all the necessary information to manufacture a PCB, including:
- Copper layers
- Solder mask
- Legend/silkscreen
- Drills and cuts
- Component placement
The Gerber file format has been around since the 1960s and has evolved over time. The current standard is the Extended Gerber or RS-274X format. Almost all PCB design software can export Gerber files, and virtually all PCB manufacturers accept them as manufacturing inputs.
Anatomy of a Gerber File
A Gerber file is a plain ASCII text file that uses a specific syntax to describe a 2D vector image. It consists of a stream of commands that tell the plotter or photoplotter how to draw the image. The main components of a Gerber file are:
- Apertures – Shapes and sizes of the “pens” used to draw the image
- D-codes – Specific aperture shapes referenced by number
- G-codes – Drawing commands (e.g. move, flash, linear interpolation, etc.)
- M-codes – Non-drawing commands (e.g. file end, tool change, etc.)
- X/Y coordinates – Location data for drawing objects
- I/J coordinates – Arc center points for drawing arcs
- Comments – Non-functional text used for file identification, notes, etc.
Here is a simple example of what a Gerber file looks like:
G04 Simple Gerber Example*
%FSLAX24Y24*%
%MOIN*%
%ADD10C,0.010*%
D10*
X0100Y0100D02*
X0500Y0100D01*
X0500Y0500D01*
X0100Y0500D01*
X0100Y0100D01*
M02*
This file defines a 0.010″ circular aperture (D10), moves to coordinate (100, 100), draws a 400×400 mil square, and ends the file. When plotted, it looks like this:
Of course, real-world PCB Gerber files are much more complex, often containing thousands or millions of drawing operations across multiple layers. But the basic structure is the same.
Why are Gerber Files Important for PCB Manufacturing?
Gerber files are the industry-standard way to convey PCB design data to a PCB manufacturer. They provide an unambiguous, precise definition of how to build a PCB that both humans and machines can read and interpret.
Design to Manufacturing Data Transfer
The primary role of Gerber files is to transfer PCB design data from the design domain (CAD tools) to the manufacturing domain (fabrication and assembly equipment). They act as an “interchange format” that allows different software tools and manufacturing processes to communicate.
Without Gerber files, there would be no standard way for designers to tell manufacturers what to build. Every manufacturer would require different formats, making the designer’s job much harder. And there would be more room for interpretation and error in the manufacturing process.
Fabrication and Assembly Process Control
Gerber files control the PCB fabrication and assembly processes. They tell the various manufacturing machines exactly what to do at each step:
- Plotters and photoplotters use Gerber files to create the photomasks and stencils needed for etching, plating, and screen printing.
- CNC drills use Gerber files (specifically Excellon drill files) to drill holes in the PCB.
- Pick-and-place machines use Gerber files (specifically the Component Placement file) to place components on the board.
- Automated optical inspection (AOI) machines use Gerber files to verify that the manufactured board matches the design.
In essence, Gerber files contain the “recipe” for manufacturing a PCB. They ensure that the finished product matches the designer’s intent as closely as possible.
Design Verification and DFM Checks
Gerber files also play a role in verifying the PCB design and checking it for manufacturability before committing to production. Many PCB manufacturers will ask for the Gerber files upfront so they can run them through their DFM (Design for Manufacturability) checks.
DFM checks look for common design issues that could cause problems in manufacturing, such as:
- Acid Traps and bottlenecks
- Copper slivers and short circuits
- Drill size and spacing violations
- Soldermask and silkscreen overlaps
- Insufficient annular rings
- Acute angles and jagged edges
By identifying these issues early, manufacturers can provide feedback to the designer to optimize the design for manufacturing. This helps avoid costly mistakes and delays later in the process.
What Files Make Up a Complete Gerber Package?
A complete Gerber package for PCB manufacturing typically includes the following files:
File Name | Layer(s) | Description |
---|---|---|
GTL | Top/Layer 1 Copper | Conductive copper pattern for top layer |
G1L – GnL | Inner Layer 1 – n Copper | Conductive copper pattern for inner layers |
GBL | Bottom/Layer n Copper | Conductive copper pattern for bottom layer |
GTS | Top Soldermask | Solder resist for top side of board |
GBS | Bottom Soldermask | Solder resist for bottom side of board |
GTO | Top Overlay/Silkscreen | Component legends/text for top of board |
GBO | Bottom Overlay/Silkscreen | Component legends/text for bottom of board |
GPT | Top Paste | Solder paste stencil for top of board |
GPB | Bottom Paste | Solder paste stencil for bottom of board |
TXT | Drills/Holes | NC drill file (Excellon format) |
GM1, GM2… | Board Outline/Profile | Mechanical outline of board |
Component Placement | Top/Bottom Placement | Component placement data (not a Gerber file) |
IPC-D-356 | Netlist | Electrical connectivity data (not a Gerber file) |
Not all of these files are always required – it depends on the specifics of the design. A simple 2-layer board might only need GTL, GBL, GTS, GBS, GTO, GBO and drill files. A complex multi-layer board with tight tolerances may require the full set.
It’s important that the Gerber files are complete and properly formatted. Missing or incorrect files can lead to manufacturing errors and project delays. Most PCB design tools can export a complete Gerber package from the design files, but it’s still a good idea to double check before sending to the manufacturer.

Tips for Preparing Gerber Files for Manufacturing
Use the Current Gerber File Standard
Make sure your PCB design software is exporting Gerber files in the current RS-274X format. Older formats like RS-274-D are obsolete and may not be supported by all manufacturers. If you’re not sure, check with your manufacturer for their file requirements.
Include All Necessary Layers
As mentioned above, include all the necessary Gerber files for your design. At a minimum, you’ll need files for the copper layers, soldermask, silkscreen legend, and drill hits. If your design has special requirements like solder paste stencils or complex board outlines, include those files as well.
Use Standard Naming Conventions
Use clear, standardized names for your Gerber files. Most manufacturers will specify their preferred naming convention. If not, a common convention is to use the Gerber file function as a prefix and the file type as a suffix, like this:
- GTL.GBR – Top copper layer
- GBL.GBR – Bottom copper layer
- GTS.GBR – Top soldermask
- GBS.GBR – Bottom soldermask
- GTO.GBR – Top silkscreen
- GBO.GBR – Bottom silkscreen
- TXT.DRL – NC drill file (Excellon format)
- GP1.GBR – General purpose layer 1 (e.g. board outline)
Verify the Gerber Files
Before sending your Gerber files to the manufacturer, it’s a good idea to verify them yourself. There are many free Gerber viewer tools available online, such as:
- Gerbv
- ViewMate
- GC-Prevue
- ZofzPCB
- PCB-Investigator
These tools allow you to open and visually inspect your Gerber files to make sure they match your design intent. They can also check for common formatting errors and design rule violations.
Compress the Files for Uploading
Gerber files can be quite large, especially for complex designs. To make uploading and downloading easier, compress your Gerber files into a single ZIP archive before sending. Most PCB design tools have a “ZIP output” option that will do this automatically.
Communicate with Your Manufacturer
Finally, communicate openly with your PCB manufacturer about your Gerber files and design intent. Let them know if you have any special requirements or concerns. Ask them to verify that they can work with your files and that everything looks good from their end.
Most manufacturers will be happy to provide feedback and guidance to ensure a smooth manufacturing process. Treat them as a partner in bringing your PCB to life.
Frequently Asked Questions (FAQ)
What is the difference between Gerber files and CAD files?
CAD (Computer Aided Design) files are the native design files created in your PCB design software. These files contain much more than just the 2D fabrication data – they also include schematic information, component libraries, design rules, and other metadata.
Gerber files are derived from the CAD files, but only contain the information needed for PCB fabrication. They are a “flattened” version of the design that can be used by manufacturing equipment.
You can think of CAD files as the “source code” for your PCB design, while Gerber files are the “compiled executable.”
Do I need to send both Gerber and drill files?
Yes, Gerber files only contain information about the copper layers, soldermask, and silkscreen. They do not contain drill data.
Drill data is typically provided in a separate file called an NC drill file or Excellon file. This file specifies the location, size, and type of drills needed to fabricate the board. It is just as important as the Gerber files.
Most PCB design tools will export the drill file alongside the Gerber files when you generate the manufacturing package.
What is the difference between RS-274-D and RS-274X Gerber formats?
RS-274-D (or Standard Gerber) is an older Gerber file format that dates back to the 1980s. It has several limitations, such as:
- Lack of support for apertures outside of the standard shapes
- No clear way to define the polarity of a layer (positive vs. negative)
- No standard way to include netlist information
RS-274X (or Extended Gerber) is the current standard format. It addresses the limitations of RS-274-D and adds several new features, such as:
- Custom aperture definitions using macro language
- Clear layer polarity specification
- Embedded netlist and drill data
- Support for polygon fills and arcs
Basically, RS-274X can encode more information in a standardized way, making it less ambiguous and easier for manufacturers to work with. RS-274-D is considered obsolete and should not be used for new designs.
Can I use Gerber files for PCB Assembly?
Gerber files are primarily used for PCB fabrication, but they can also play a role in assembly. The main files used for assembly are the pick-and-place file (or placement file) and the bill of materials (BOM).
The pick-and-place file specifies the location and orientation of each component on the board. It is typically generated from the CAD data, but it uses the Gerber files as a reference for the board dimensions and features.
The BOM lists all the components needed to assemble the board, along with their quantities and part numbers. It is also derived from the CAD data.
So while Gerber files are not directly used for assembly, they are still an important part of the overall manufacturing process.
Can I edit Gerber files directly?
In general, no. Gerber files are meant to be a final output format, not an editable design format. They don’t contain enough information to fully reconstruct the original PCB design.
That said, there are some tools that allow you to do basic editing of Gerber files, such as moving or deleting elements. But this should only be done as a last resort, and with great care. It’s very easy to introduce errors or inconsistencies that could cause problems in manufacturing.
If you need to make changes to your PCB design, it’s best to do so in your CAD tool and then re-generate the Gerber files from the updated design.
Conclusion
Gerber files are an essential part of the PCB design and manufacturing process. They provide the universal language that allows designers and manufacturers to communicate and collaborate effectively.
As a PCB designer, it’s important to understand what Gerber files are, how they are used, and how to generate them correctly. Properly prepared Gerber files can help ensure that your PCB design becomes a high-quality, reliable manufactured product.
So the next time you’re ready to turn your PCB design into reality, remember the vital role that Gerber files play. They may just look like a bunch of numbers and codes, but they are the key to unlocking the power of PCB manufacturing.
0 Comments