What is a Gerber File?
A Gerber file is a standard file format used in the printed circuit board (PCB) industry to describe the printed circuit board images: copper layers, solder mask, legend, drill data, etc. It is a vector image file format: the image is made up of primitives such as boundaries, paths, polygons, and so on.
The Gerber file format was originally developed by the Gerber Systems Corp., a division of Gerber Scientific, founded by Joseph Gerber. The Gerber file is now an open ASCII vector format for 2D binary images. It is the de facto standard used by PCB industry software to describe the printed circuit board images: copper layers, solder mask, legend, drill data, etc.
Types of Gerber Files
There are several types of Gerber files used in PCB design and manufacturing:
Gerber File Extension | Description |
---|---|
.GBR | Generic extension, used for all Gerber files |
.GTL | Top copper layer |
.GBL | Bottom copper layer |
.GTO | Top silkscreen overlay |
.GBO | Bottom silkscreen overlay |
.GTP | Top solder paste layer |
.GBP | Bottom solder paste layer |
.GTS | Top solder mask layer |
.GBS | Bottom solder mask layer |
.GM1, .GM2… | Internal copper layers |
Why Use Gerber Files?
There are several reasons why Gerber files are widely used in the PCB industry:
-
Standardization: Gerber is the de facto standard file format for PCB design data exchange. Almost all PCB design software and manufacturing equipment support Gerber files.
-
Simplicity: Gerber files are simple ASCII text files that describe 2D binary images. They are easy to generate, read, parse, and process.
-
Reliability: Gerber files have been used in the PCB industry for decades and have proven to be a reliable and robust format for data exchange.
-
Flexibility: Gerber files can describe a wide range of PCB features and attributes, such as copper traces, pads, vias, solder mask openings, silkscreen text and graphics, drill holes, etc.
How to Generate Gerber Files?
Most PCB design software can generate Gerber files from the PCB design data. The exact steps may vary depending on the software, but the general process is:
- Complete the PCB design and layout.
- Define the layer stackup and assign the appropriate Gerber file extension to each layer.
- Set the Gerber file output options, such as unit (inch or mm), format (leading/trailing zeros), aperture list, etc.
- Generate the Gerber files for each layer.
- Review and verify the generated Gerber files using a Gerber Viewer.
Some popular PCB design software that can generate Gerber files include:
- Altium Designer
- KiCad
- Eagle
- OrCAD
- PADS

How to Read and Interpret Gerber Files?
Gerber files are plain ASCII text files that can be opened and viewed in any text editor. However, the Gerber data is not human-readable and requires a Gerber viewer to interpret and display the image.
A Gerber viewer is a software tool that can read and parse Gerber files and display the PCB image. Some popular Gerber viewers include:
- GerbView (included with KiCad)
- ViewMate (standalone)
- CAM350 (standalone)
When opening a Gerber file in a viewer, you will see the PCB image rendered as 2D graphics. You can zoom in/out, pan, and measure distances and sizes.
The Gerber data consists of commands that describe the image primitives, such as:
- Aperture definition (AD)
- Aperture selection (Dnn)
- Linear interpolation (Lnnnn)
- Flash (Fnnnn)
- Polygon fill (Gnn)
- Comment (G04)
- End of file (M02)
Here’s an example of Gerber data for a simple PCB with a single rectangular pad:
G04 Simple PCB with a rectangular pad *
%FSLAX24Y24*%
%MOMM*%
%ADD10R,5.0800X2.5400*%
D10*
X7620000Y5080000D03*
M02*
In this example:
– %FSLAX24Y24*%
sets the format specification to 2.4 format (leading zeros omitted).
– %MOMM*%
sets the unit to millimeters.
– %ADD10R,5.0800X2.5400*%
defines aperture D10 as a rectangle of size 5.08 x 2.54 mm.
– D10*
selects aperture D10.
– X7620000Y5080000D03*
flashes aperture D10 at position X=7.62, Y=5.08.
– M02*
indicates the end of the file.
Best Practices for Working with Gerber Files
Here are some best practices to follow when working with Gerber files:
-
Use a consistent naming convention: Adopt a clear and consistent naming convention for your Gerber files that includes the PCB name, revision, and layer identifier. For example:
PCB1_Rev2_TopCopper.GTL
-
Include all necessary layers: Make sure to generate Gerber files for all the layers required for manufacturing, including copper, solder mask, silkscreen, paste, and drill data.
-
Use a single unit system: Stick to either inches or millimeters for all your Gerber files to avoid confusion and errors.
-
Set appropriate output options: Choose the appropriate Gerber file format (such as 2.4 or 2.5) and aperture list type (embedded or separate file) based on your manufacturer’s requirements.
-
Verify the Gerber files: Always review and verify the generated Gerber files using a Gerber viewer to catch any errors or discrepancies before sending them to manufacturing.
-
Communicate with your manufacturer: Discuss your Gerber file requirements and preferences with your PCB manufacturer to ensure smooth and error-free data exchange.
Frequently Asked Questions (FAQ)
- What is the difference between Gerber RS-274D and RS-274X?
-
RS-274D is an older Gerber format that has several limitations, such as no support for aperture macros and polygons. RS-274X is the extended Gerber format that adds support for these features and more. Most modern PCB design software and manufacturers use RS-274X.
-
Can Gerber files contain multiple layers?
-
No, each Gerber file represents a single layer of the PCB. You need to generate separate Gerber files for each layer (copper, solder mask, silkscreen, etc.) and provide them as a set to the manufacturer.
-
What is an aperture list?
-
An aperture list is a file that defines the shapes and sizes of the apertures (flash, draw, etc.) used in the Gerber data. It can be embedded in the Gerber file (embedded aperture list) or provided as a separate file (external aperture list).
-
How do I know what Gerber file extensions to use?
-
The Gerber file extensions are not standardized and may vary depending on the PCB design software and manufacturer. Common extensions include GTL/GBL (top/bottom copper), GTO/GBO (top/bottom silkscreen), GTS/GBS (top/bottom solder mask), and GTP/GBP (top/bottom paste). Consult with your manufacturer for their preferred extensions.
-
Can I view Gerber files without specialized software?
- Gerber files are ASCII text files and can be opened in any text editor. However, the Gerber data is not human-readable and requires a Gerber viewer to interpret and display the PCB image. There are many free and paid Gerber viewers available, such as GerbView (included with KiCad), ViewMate, and CAM350.
In conclusion, Gerber files are an essential part of the PCB design and manufacturing process. By understanding the Gerber file format, generation process, and best practices, you can ensure smooth and error-free data exchange with your PCB manufacturer and get your designs manufactured quickly and accurately.