Contact Us
Blog >> Blog Details Page

Gerber Files for PCBs: Creating, Viewing, and Converting

Posted:04:41 PM March 28, 2024 writer: R.H

This article offers a comprehensive exploration of what a Gerber file is, how to create gerber file, how to open gerber file , how to convert Gerber files to PDF format and the relationship between Gerber file and PCB manufacturing. Dive into the heart of PCB manufacturing by understanding the indispensable connection between Gerber files and the fabrication process, optimizing your designs. 

Table of Contents

What is Gerber file

Gerber files are a standardized file format used in the electronics industry to describe the images of printed circuit boards (PCBs), including copper traces, insulation layers, drill holes, and other information. This format is widely employed in the PCB manufacturing process to enable manufacturers to precisely understand how to build the circuit boards. Gerber files essentially serve as the final output of PCB design, which is sent to PCB manufacturers for production.
Since its introduction, the Gerber format has undergone several important revisions and updates to adapt to the evolving needs of PCB design and manufacturing.

History and Evolution of Gerber Files

The history of the Gerber file format dates back to the 1970s, when the rise of electronic products led to an increasing demand for PCB design and manufacturing. Here are some important versions and their characteristics:

  • RS-274-D: The initial version, which only supports basic graphic descriptions such as lines, arcs, and circles, suitable for simple PCB designs.
  • RS-274X: This version introduced extended functionality, supporting layered structures and more complex designs, enabling the transmission of more layer information and component layouts.
  • Gerber X2: The latest version, which is not only compatible with RS-274X but also provides a richer dataset, including more information about materials, layer structures, and design intentions. This allows designers to express complex circuit designs more clearly within the files.

Composition of Gerber Files

Gerber file parsed by HQDFM Gerber Viewer Online
                                             ( image of gerber file parsed by HQDFM gerber viewer online)

Gerber files are the core documents that describe the design of printed circuit boards (PCBs) and typically consist of multiple parts, each carrying specific information. Understanding these components helps designers generate high-quality files and ensures manufacturers accurately execute design intentions.

1. Graphic Data

Graphic data is the core of a Gerber file, primarily used to describe the electrical connections and layout of the PCB. Specifically, it includes:

  • Traces: Wires connecting various components in the circuit. When designing, the width (i.e., trace width) and spacing of traces must meet the manufacturer's requirements to avoid signal degradation and electromagnetic interference (EMI). Impedance matching is particularly important for high-frequency circuits.
  • Pads: Copper areas that connect to component pins. The shape (typically round or square), size, and layout of pads must match the pins of the components used to ensure good soldering quality. Designers need to consider the thermal impact during the soldering process and choose pad sizes appropriately.
  • Patterns: This includes identifiers, polarity indicators, and component patterns on the circuit board, helping to better identify circuit functions and connections during assembly and maintenance. Such identifying information is usually printed on the silkscreen layer.
  • Multilayer Traces: In multilayer PCB designs, traces may span multiple layers, and designers must ensure that these traces connect correctly between layers, typically through vias.

2. Layer Information

Each Gerber file typically corresponds to a specific layer of the PCB, with each layer serving a unique function:

  • Signal Layers: Contain all electrical signal traces and pads. A single-sided PCB typically has one signal layer, while a multilayer PCB may feature multiple signal layers. Designers must ensure electrical isolation and proper routing between these signal layers.
  • Power Layers: Dedicated to power distribution, these layers generally contain large copper areas to facilitate the transmission of high current while minimizing voltage drop. Designers should consider current paths to reduce inductance in the power layer.
  • Ground Layers: To provide effective grounding and reduce noise, ground layers usually comprise extensive copper areas. A well-designed ground plane can significantly lower EMI and enhance signal integrity.
  • Silkscreen Layers: Used for printing component names, polarity indicators, test points, and other information on the PCB. The layout of silkscreen layers should not obscure pads and connection points to prevent interference during soldering.
  • Other Auxiliary Layers: For example, solder mask layers cover non-solder areas of the PCB to prevent short circuits and environmental impacts. Additional layers like aluminum or copper may be utilized for specific functions.

3. Drill Information

Drill information is a crucial part of the Gerber file, primarily indicating the positions and types of holes that need to be drilled:

  • Vias: Conductive holes that connect different layers, allowing signals to pass between layers. Designers need to specify the type of each hole (blind, buried, or through-hole) and its size to ensure correct drilling during manufacturing.
  • Mounting Holes: Holes used for installing and securing the PCB, typically requiring specific diameters and positions to fit enclosures or brackets. The design of mounting holes must consider strength and positioning accuracy.
  • Fill Holes: Sometimes designed for electrical connections or fluid flow, fill holes must consider the filling material and its compatibility with other parts of the PCB.

4. Boundary Information

Boundary information defines the physical shape of the PCB, including:

  • Outline: Describes the external contour of the PCB, usually as a closed path. When designing the outline, it is essential to meet mechanical installation and thermal management requirements.
  • Cutouts: Certain functions may require notches or cutouts in the PCB design, which must be clearly marked in the Gerber file for accurate execution by manufacturers.

5. Text and Annotations

Adding textual information in Gerber files provides additional guidance, typically including:

  • Design Notes: Brief descriptions explaining the purpose of the PCB and specific design requirements to aid manufacturers in understanding design intent.
  • Component Identifiers: Textual indications of specific components' names and positions, assisting manufacturers in quickly identifying and locating components during assembly.
  • Additional Annotations: Information related to manufacturing or assembly, such as soldering temperatures and testing requirements, ensuring a smooth production process.

6. Component Information

In some cases, Gerber files may contain component information, such as:

  • Package Type: The specific package type for each component, helping manufacturers select the appropriate components and confirm their correct placement on the PCB.
  • Placement Data: Information about the position and orientation of components on the PCB, ensuring correct placement during assembly.

7. File Format and Naming Conventions

Gerber files follow the RS-274X or Gerber X2 specifications, which define the structure, content, and naming rules of the files. Typically, each Gerber file is saved with specific extensions (e.g., .gbr, .gtp, .gbl, .gbo, etc.). File naming should be concise and clear for easy identification and management.

Importance of Gerber Files

Generating high-quality Gerber files is a critical step in PCB design and production. Here are several key reasons:

  • Accuracy: Gerber files must accurately reflect the designer's intentions; any minor errors can lead to PCB malfunctions or even safety hazards.
  • Compatibility: Different manufacturers may use various equipment and software, so using a standardized Gerber format ensures broad compatibility of files.
  • Efficiency: High-quality Gerber files reduce communication costs and time during manufacturing, improving overall work efficiency.

Best Practices for Generating and Validating Gerber Files

To ensure the quality of Gerber files, designers should follow these best practices during generation and validation:

  • Use Industry-Standard Software: Select powerful PCB design software (e.g., Altium Designer, Eagle, KiCAD) to generate Gerber files, ensuring compliance with the latest standards.
  • Conduct Comprehensive Checks: Utilize Gerber viewer software (e.g., ViewMate, HQDFM, GC-Prevue) for detailed inspections, ensuring that every layer's graphics, drill positions, and annotations are accurate.
  • Document the Design Process: Keep records of significant decisions and changes made during the design process for future reference and review, ensuring consistency and completeness.
  • Communicate with Manufacturers: After generating the files, engage in discussions with PCB manufacturers to confirm file content and requirements, ensuring smooth production of circuit boards that meet design specifications.

Download the HQDFM Gerber files for demo

gerber samples

How to create Gerber file

The process of creating Gerber files typically begins after you complete a PCB (Printed Circuit Board) design, as a step to convert the design into a set of files that manufacturers can use to produce actual circuit boards. In most PCB design software, you will find an option to export or generate Gerber files. Here are some Gerber file export tutorials:

How to export Gerber file from KiCad

KiCad is easy to download, and it is free software that is applied for computer-aided design(CAD) and electronic design automation(EDA). This tool can help users realize their electrical circuits and create a BOM list, 3D view of the PCB + components, artwork, and Gerber files. Gerber file is the standard file type for PCB fabrication, PCB prototype, and PCB assembly. This article is a guide for you to output the Gerber files from your finished PCB designing in KiCad.

Step 1: Find the plot icon
Please find the PCB design file in KiCad and select "Plot" under the "Files" to open the Gerber generation tool.

kicad export gerber file output.png

Step 2: Plot settings
Select the layers and set an output directory for the Gerber files. Then click "Plot" to export the Gerber file for the layers.
NOTES: Please tick all layers if you are not sure which layers you need. NEXTPCB will help you to check the right layers for PCB manufacturing.

kicad export gerber file output.png

Step 3: Output Drill files
Ensure the Plot format is set to "Gerber." Next, please click the "Generate Drill File" button, and use the default values as the following picture. The output folder should be the default, which is the same as the Gerber files. Then click "Drill File" after everything is OK.

kicad export gerber file output-3.png

Step 4: Check the finished Gerber files
Please click "Close" to exit the windows of Plot and Drill. You can find all the data you need in the Gerber file folders. There is a Gerber viewer called "GerbView" in KiCad, and you can open it and check what the PCB looks like.

kicad export gerber file output-4.png

The Gerber files generated are all the production files PCB manufacturers need to quote and fabricate your PCBs. Please feel free to contact online services if you are still not clear about the processes. 

How to export Gerber files from Altium PCB

If you need to place a PCB order on the NextPCB website, you should provide a Gerber file which is for PCB manufacturing. This article shows the steps on how to export Gerber files from Altium PCB software.
Step 1. Open you .PCBDOC design files on Altium designer software
Click: File -> Fabrication Outputs -> Gerber Files.

Gerber Files

Step 2. General Setting
In the General Setting, please set the precision to 2:5 (0.01 mill resolution)

General Setting

Step 3. Layers Setting
Firstly, please make sure you have a clear outline in the mechanical layer. If your board is a 2-layer PCB, there will be no inner layers (G1, G2, G3....). Include the layers that you want to export by marking these, select "Used On" in Plot Layers, and Select "All Off" in Mirror Layers.

Layers Setting

Step 4. Aperture Setting
Please make sure to mark the "Embedded apertures (RS-274-X)" format.

Aperture Setting

Step 5. Advanced Setting
See the below picture, when you make sure all configurations are fine. Please click the "OK" to generate the Gerber files. Gerber Files will be automatically exported from the Altium cam viewer.
This tool allows you to verify that all layers have been generated correctly and that they are all in positive mode.

Advanced Setting

Step 6. Generating NC Drill Data
Don't forget to export the NC Drill data after generating the Gerber file. Many engineers will forget this step so that the supplier could not fabricate the PCBs without a drill data file.
a. Generate the Drilling layer in Excellon format.
Choose: File -> Fabrication Outputs -> NC Drill Files

NC Drill Files

b. We recommend you choose the same units and format parameters in this setting process for drill data. Then click "OK".

After this step, please zip the Gerber files and NC Drill data, and then the correct Gerber files have been done.

How to export Gerber files from Diptrace Software

DipTrace is an EDA/CAD software for creating schematic diagrams and printed circuit boards. The developers provide a multi-lingual interface and tutorials (currently available in English and 21 other languages).
DipTrace has 4 modules: schematic capture editor, PCB layout editor with built-in shape-based autoroute and 3D-preview & export, component editor, and pattern editor. Comparing Altium and Eagle PCB design software, Diptrace software will be much easier to export Gerber files.
Step 1. Select File -> Export -> Gerber.

Gerber

Step 2. Click "Export All" and save all the layers

Export All
Step 3. After exporting the Gerber files, we need to export the NC Drill files.

NC Drill files

Export
This is the guide from NextPCB on how to Export Gerber files From Diptrace Software.

How to export Gerber files from Eagle file

What is Eagle software?
EAGLE is a scriptable electronic design automation (EDA) application with schematic capture, printed circuit board (PCB) layout, auto-router, and computer-aided manufacturing (CAM) features. EAGLE stands for Easily Applicable Graphical Layout Editor (German: Einfach Anzuwendender Grafischer Layout-Editor) and is developed by CadSoft Computer GmbH. The company was acquired by Autodesk Inc. in 2016. EAGLE contains a schematic editor, for designing circuit diagrams. Schematics are stored in files.SCH extension, parts are defined in device libraries with LBR extension. Parts can be placed on many sheets and connected together through ports. The PCB layout editor stores board files with the extension.BRD. It allows back-annotation to the schematic and auto-routing to automatically connect traces based on the connections defined in the schematic. When you finish your PCB design in Eagle, you can generate Gerber files that are needed by the PCB manufacturer. This NextPCB article is telling you how to export the Gerber file from Eagle software.

Step 1. Open the CAM Processor
Open your PCB layout (.brd) file in Eagle, Click the "CAM" button or choose "File -> CAM Processor". This will open the CAM Processor tool that is used to generate the files.

Step 2. Click File -> Open -> Job


Step 3. Then navigate to your default EAGLE cam folder, choose the GERBER_RS274x.cam file, and press Open.

Step 4. Adding a second silkscreen (Optional)
If you look at the Layer options, it doesn't have a file for the silk screen bottom. But if you need a silkscreen on the bottom layer as well, follow these steps:

  • a. Click "Add"
  • b. Change the Section to something like "Silk Screen SOL"
  • c. Change File to "%N.pls"
  • d. Deselect all layers
  • e. Select layers 20 "Dimension", 22 "blames" and 26 "blames"

Step 5. Select the Process Job button to create all of your Gerber files.
You can find all of your generated Gerber files in the Autodesk EAGLEControl Panel in your project folder.
Step 6. Generating Your Drill File

  • a. Select the CAM Processor at the top of your interface or select File » CAM Processor to open the CAM processor dialog.
  • b. You now need to load a drill CAM job to get things started. Select File » Open » Job,and in your default EAGLE cam folder select the excellent. cam file, then select Open.
  • c. you'll now have a single Generate drill data tab available, which will grab the data from layers 44 Drills and 45 Holes, just what you need. Select the Process Job button to generate this file.

After those steps, Gerber files and Drill data have been exported from Eagle software.
Feel free to contact us: support@nextpcb.com if you have any more questions.

How to open Gerber file

To open Gerber files, you need to use specialized Gerber viewers or PCB design software. Here are some commonly used methods:

  • Gerber viewer software: There are many free or commercial Gerber viewers available. You can search and download a Gerber viewer that is suitable for your operating system from the internet. Some common Gerber viewers include GC-Prevue, GerberView, ViewMate, etc. Once installed and opened, these software allow you to view and analyze PCB designs by importing Gerber files.
  • PCB design software: Most mainstream PCB design software such as Altium Designer, Eagle, KiCad, etc., support opening Gerber files. You can open these software and import the Gerber file as a project or part of a PCB design. Through this method, you can view the Gerber file and perform further analysis, editing, and validation within the design software.

Furthermore, if you are in need of a free Gerber viewer, an excellent option is NextPCB's Free Gerber Viewer Online. NextPCB is a reputable PCB manufacturing and assembly service provider that offers a robust and user-friendly online Gerber Viewer tool. This free viewer allows you to open and inspect Gerber files seamlessly without the requirement of installing any software. It supports various Gerber formats, including RS-274X, Extended (X2) and OBD++, and provides a wide array of features such as zooming, rotation, measurement tools, and more, enabling you to conduct comprehensive analysis and verification of your PCB designs. Whether you are an experienced PCB designer or a novice, NextPCB's Free Gerber Viewer is a valuable resource that simplifies the process of viewing and examining Gerber files. What's more, it can analyze design defects online and generate DFM reports.

Gerber Viewer Online

 

Check Your Gerber Files Online Now

How to convert Gerber file to PDF

There is a comprehensive software solution that not only enables DFM and PCBA analysis but also There is a comprehensive software solution that not only enables DFM and PCBA analysis but also generates detailed DFM reports, offering the capability to export Gerber files as PDF.
The HQDFM software incorporates powerful DFM analysis features, capable of detecting and identifying potential manufacturing issues such as inadequate component spacing, dense routing, pin conflicts, and more. By performing DFM analysis on Gerber files, HQDFM aids design engineers in identifying and resolving potential issues during the design phase, thereby enhancing design manufacturability and efficiency.
Moreover, HQDFM provides comprehensive PCBA analysis functionality, enabling the assessment of the feasibility and effectiveness of circuit board assembly. It automatically detects and evaluates aspects such as solder pads, component placement, silk screen markings, ensuring correct assembly and reliability of the circuit board.
In addition to complementing DFM and PCBA analysis, HQDFM generates detailed DFM reports. These reports encompass the results of DFM analysis and PCBA evaluation, along with recommended improvement measures. Through DFM reports, design engineers and manufacturers gain better insights into potential issues in the design and can take appropriate actions to enhance the manufacturing and assembly processes.
Furthermore, HQDFM includes the essential capability of converting Gerber files to PDF. This feature enables users to conveniently share and reference design files without the need for specific software or tools. PDF files offer broad compatibility and can be opened and viewed on various devices and operating systems.
This is the main interface of HQDFM software:

DFM Tool

After uploading the Gerber file to the HQDFM software, click “File” in the upper left corner, and then select “Export PDF” to export gerber file to PDF.

Gerber export to PDF

Why not give HQDFM's DFM analysis and PCBA analysis features a try? It's completely free, giving it a shot and seeing how it works for yourself. Just like the demo file below, you can see that many errors were detected.

Gerber export to PDF

Download HQDFM Software Now

The relationship between Gerber files and PCB manufacturing

Gerber files play a crucial role in the manufacturing of printed circuit boards (PCBs) within the PCB industry. Gerber files serve as the standard format for describing PCB designs and encompass information regarding component placement, routing, pads, silkscreen, and other design elements.
In the PCB manufacturing process, manufacturers rely on Gerber files to perform a series of operations that transform the design into an actual PCB.

  • Process Preparation: Manufacturers utilize Gerber files for process preparation. Based on the Gerber files, they determine the physical layers, layer sequencing, material parameters, and other specifications necessary to prepare the manufacturing process.
  • Layer Generation: Manufacturers generate the various layers required during PCB fabrication based on the Gerber files. These layers include copper layers, solder mask layers, silkscreen layers, drill layers, and more. Each layer corresponds to specific information within the Gerber files.
  • Exposure and Development: By combining the information from the Gerber files with photosensitive materials, the desired patterns are formed during the exposure and development processes in PCB manufacturing. The purpose of exposure and development is to transform the design defined in the Gerber files into the actual PCB structure.
  • Manufacturing Process Control: The information within the Gerber files guides manufacturers in controlling the fabrication process. They govern processes such as solder mask application, metallization, copper plating, etching, drilling, and more, ensuring the accuracy and consistency of the design.
  • Quality Control and Inspection: After PCB manufacturing is completed, Gerber files are also employed for quality control and inspection purposes. Manufacturers can reference the Gerber files to examine the production quality, dimensions, component placement, and other aspects to ensure compliance with requirements.

Why gerber files are important for manufacturing

Manufacturers typically need the original Gerber files for adjustments and optimization. For example, if your original design has a line width of 6mil, but the file you send to the supplier shows a width of 6.6mil, this modified file is referred to as a "working Gerber" (used for production). Such files have been processed through CAM, potentially including manufacturing compensation, process optimization, and other necessary adjustments. Given that each manufacturer has its own engineering workflow, they may find these changes unclear.

  • Original Gerber File: The file generated during the design phase, containing the designer's initial intent and all design details.
  • Working Gerber File: This file has undergone processing and adjustment, including pre-production compensation and optimization.
  • Why Factories Need Original Files: To ensure that all compensations and optimizations are correctly applied, manufacturers usually require the original design Gerber file. This helps prevent confusion or problems that may arise due to unclear modifications in the working files.

In summary, Gerber files serve as a bridge and guide within PCB manufacturing, transforming design engineers' creativity into tangible PCBs. Manufacturers rely on Gerber files for process preparation, layer generation, manufacturing process control, and quality inspection to ensure that the produced PCBs align with the design and meet quality standards.

Gerber Files for PCBs: Common Issues and Solutions

Ensuring the completeness and accuracy of Gerber files for pcb is crucial for guaranteeing that each pcb board meets the required specifications when it is produced. Here are some of the most common Gerber file issues encountered by HQNextPCB, a PCB manufacturer with over 15 years of production experience, and what can be done to address them:

  • Empty Gerber Files: Surprisingly, designers can create Gerber files with no information, known as "zero-byte" files. Anyone reviewing the file cannot determine if it is completely irrelevant or if it contains accidentally deleted information. Designers must check each Gerber file to ensure it contains useful information before sending it.
  • Missing or Incomplete Files: This issue is almost the opposite of the first. Manufacturers need to know every specification related to the PCB, from the dimensions of plated through holes to the overall board size. Missing information can result in a board that does not meet the required specifications. It is crucial to ensure that every necessary Gerber file is prepared and accessible.
  • Improper File Labeling: While not catastrophic, it is highly recommended that designers name all Gerber files according to an established naming convention that the manufacturer can understand. This way, the manufacturer can immediately find the required Gerber files without worrying about whether they have the correct ones.
  • Excesive Aperture Lists: Ideally, a Gerber file should have a single aperture list containing all the details about the tools required for each production stage. Multiple aperture lists can cause confusion, slow down the manufacturing process, and increase the chances of errors. Designers should also be cautious of creating aperture lists in formats other than the Gerber file format, as this can lead to further confusion.
  • Composite Layer Design Errors: If the design software creates composite layers while generating single-layer design specifications, it is important to combine the images and create one Gerber file for each layer to avoid errors.

Among all the potential issues your PCB might encounter, Gerber file errors are the least forgivable. While most PCB design errors can be avoided with more careful and focused work, Gerber file errors are the easiest to prevent. Given that the consequences of Gerber file issues can be expensive and time-consuming, you simply cannot afford to let them occur. Here are some methods to help you avoid Gerber file issues:

  • Use a Gerber file viewer to inspect the Gerber files.
  • Get it prototyped to ensure the specifications are correct.
  • Use high-resolution CAD software.
  • Follow best quality assurance practices throughout the design process.

By implementing these measures, you can significantly reduce the risk of Gerber file issues and ensure a smoother, more efficient PCB production process.

Check Your Gerber Files Online for Free

Tag: Gerber Viewer Gerber File gerber file
  • PCB
    Prototype
  • PCB
    Assembly
  • SMD
    Stencil

Dimensions: (mm)

×

Quantity: (pcs)

5
5
10
15
20
25
30
40
50
75
100
120
150
200
250
300
350
400
450
500
600
700
800
900
1000
1500
2000
2500
3000
3500
4000
4500
5000
5500
6000
6500
7000
7500
8000
9000
10000

Other Quantities:(quantity*length*width is greater than 10㎡)

OK

Layers:

Thickness:

Quote now