What is Gerber File and How to Create a Gerber

Posted by

Introduction to 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. It is a 2D binary vector image file format containing information about the copper layers, solder mask, legend, drill holes, and other features of a PCB. Gerber files are essential for PCB Fabrication as they provide the necessary information for the manufacturing process.

History of Gerber File Format

The Gerber file format was developed by the Gerber Systems Corp. in the 1960s as a means to drive their vector photoplotters for PCB Production. Over time, it has evolved and become a standard file format in the PCB industry. The current version of the Gerber format is known as Extended Gerber or RS-274X.

Importance of Gerber Files in PCB Manufacturing

Gerber files are crucial in PCB manufacturing as they contain all the necessary information for fabricating a PCB. The PCB design software generates Gerber files that include data about:

  • Copper layers
  • Solder mask
  • Silkscreen
  • Drill holes
  • Board outline

The PCB manufacturer uses these files to create the physical PCB by means of photolithography, etching, drilling, and other processes.

How Gerber Files are Generated

PCB Design Software

Gerber files are typically generated using PCB design software. Some popular PCB design software include:

Software Developer Operating System
Altium Designer Altium Windows
KiCad KiCad Windows, macOS, Linux
Eagle Autodesk Windows, macOS, Linux
OrCAD Cadence Windows
PADS Mentor Graphics Windows

These software allow users to design the PCB layout and generate Gerber files for manufacturing.

Gerber File Generation Process

The process of generating Gerber files from a PCB design software typically involves the following steps:

  1. Complete the PCB design layout.
  2. Define the layer stackup and layer mapping.
  3. Set up the Gerber file output settings.
  4. Generate the Gerber files for each layer.
  5. Verify the Gerber files using a Gerber viewer.

It is important to ensure that the generated Gerber files are accurate and complete before sending them to the PCB manufacturer.

Gerber File Structure

Gerber File Format

The Extended Gerber or RS-274X format consists of ASCII text commands that describe the image. A Gerber file typically starts with an aperture list that defines the shapes and sizes used in the image. This is followed by the image data that describes the actual image.

Aperture List

The aperture list is a set of definitions that describe the shapes and sizes used in the Gerber image. Each aperture definition consists of a D-code number and the corresponding shape and size parameters. For example:


In this example, D-code 10 defines a circle with a diameter of 0.1 units, and D-code 11 defines a rectangle with a size of 0.5 by 0.25 units.

Image Data

The image data describes the actual image using a series of G-code and D-code commands. G-codes control the image creation, such as moving the plotter and turning the aperture on or off. D-codes specify the aperture to be used for drawing.

Example image data:


In this example, D10 selects the aperture defined by D-code 10. G01 moves the plotter to the specified X,Y coordinates, and D02 turns the aperture off (moves without drawing), while D01 turns the aperture on (draws a line).

Types of Gerber Files

A complete set of Gerber files for a PCB typically includes the following types of files:

Copper Layer Files

Copper layer files describe the copper traces and pads on each layer of the PCB. There is a separate Gerber file for each copper layer, such as the top layer, bottom layer, and inner layers.

Solder Mask Files

Solder mask files define the areas where the solder mask should be applied on the PCB. The solder mask is a protective layer that covers the copper traces, leaving only the pads exposed for soldering.

Silkscreen Files

Silkscreen files contain the artwork for the text and symbols printed on the PCB surface, such as component identifiers and logos.

Drill Files

Drill files specify the location, size, and type of drill holes on the PCB. These files are typically in the Excellon format, which is another standard file format used in PCB manufacturing.

Board Outline File

The board outline file defines the physical shape and size of the PCB.

Best Practices for Creating Gerber Files

To ensure that the Gerber files are accurate and suitable for manufacturing, follow these best practices:

  1. Use a consistent naming convention for the Gerber files.
  2. Ensure that the Gerber files are generated with the correct settings, such as units and zero suppression.
  3. Include all necessary layers, such as copper layers, solder mask, and silkscreen.
  4. Verify the Gerber files using a Gerber viewer to check for errors or missing features.
  5. Communicate with the PCB manufacturer to ensure that they have all the required files and information for fabrication.

Common Gerber File Issues and Solutions

Incorrect Aperture Sizes

Incorrect aperture sizes can lead to issues such as open circuits or short circuits on the PCB. To avoid this, ensure that the aperture sizes are defined correctly in the aperture list and that they match the design requirements.

Missing Layers

If a required layer is missing from the Gerber files, the PCB manufacturer may not be able to fabricate the board correctly. Always double-check that all necessary layers are included in the Gerber file set before sending it for manufacturing.

Incorrect Board Outline

An incorrect board outline can result in a PCB that does not fit the intended enclosure or has incorrect dimensions. Verify that the board outline file matches the desired PCB shape and size.

Incompatible File Format

Some PCB Manufacturers may not accept Gerber files in the Extended Gerber format. In such cases, you may need to generate the files in the older RS-274D format or consult with the manufacturer for their preferred file format.


What is the difference between Gerber files and CAD files?

Gerber files are 2D image files that describe the PCB layout, while CAD (Computer-Aided Design) files are 3D design files used to create the PCB layout. CAD files contain more information about the PCB design, such as component placement and routing, whereas Gerber files only contain the information necessary for manufacturing.

Can I view Gerber files without special software?

No, Gerber files are binary files that require specialized software, such as a Gerber viewer, to be viewed and analyzed. Many PCB design software include built-in Gerber viewers, and there are also standalone Gerber viewer applications available.

What should I do if my PCB manufacturer reports issues with my Gerber files?

If your PCB manufacturer reports issues with your Gerber files, first verify the files using a Gerber viewer to check for any obvious errors. If the files appear correct, consult with the manufacturer to understand the specific issue and how to resolve it. You may need to modify your PCB design or regenerate the Gerber files with different settings.

Can I use Gerber files for other manufacturing processes besides PCBs?

While Gerber files are primarily used in the PCB industry, they can also be used for other manufacturing processes that involve 2D vector images, such as laser cutting or engraving. However, the specific requirements and settings for these processes may differ from those used in PCB manufacturing.

Are there any alternatives to Gerber files for PCB manufacturing?

While Gerber files are the most widely used format for PCB manufacturing, there are some alternative formats, such as ODB++ (Open Database Plus Plus) and IPC-2581. These formats aim to provide more comprehensive and intelligent data exchange between PCB design and manufacturing. However, Gerber files remain the most widely supported and used format in the industry.


Gerber files are essential for PCB manufacturing, as they contain all the necessary information for fabricating a PCB. By understanding the Gerber file format, structure, and best practices for creation, you can ensure that your PCB design is accurately translated into a physical board. Always verify your Gerber files and communicate with your PCB manufacturer to avoid any issues in the manufacturing process.