Extend Extended Gerber – Gerber X2

Posted by

Introduction to Gerber X2

Gerber X2 is an extension of the widely used Gerber file format for PCB (Printed Circuit Board) design and manufacturing. It builds upon the foundation of Extended Gerber (RS-274X) and introduces new features and enhancements to streamline the PCB fabrication process. Gerber X2 aims to improve communication between PCB designers and manufacturers by providing a more comprehensive and standardized data format.

What is Gerber X2?

Gerber X2 is a powerful file format that encapsulates all the necessary information for PCB fabrication in a single file. It includes not only the graphical data for the PCB layers but also the associated metadata, such as layer types, materials, and design intent. By incorporating this additional information, Gerber X2 eliminates ambiguities and reduces the need for manual interpretation, leading to fewer errors and faster turnaround times.

Benefits of Gerber X2

The adoption of Gerber X2 offers several key benefits for both PCB designers and manufacturers:

  1. Enhanced Communication: Gerber X2 provides a standardized way to convey design intent and manufacturing requirements, minimizing misinterpretations and reducing the need for back-and-forth communication between designers and manufacturers.

  2. Improved Efficiency: With Gerber X2, manufacturers can automate many aspects of the PCB fabrication process, as the file format includes all the necessary information. This automation leads to faster setup times, reduced errors, and increased overall efficiency.

  3. Comprehensive Data: Gerber X2 files contain a complete set of data required for PCB fabrication, including layer stackup, material specifications, and design rules. This eliminates the need for separate documentation and ensures that all relevant information is readily available in a single file.

  4. Backward Compatibility: Gerber X2 is fully backward compatible with Extended Gerber (RS-274X). This means that existing Gerber files can be easily upgraded to Gerber X2 without losing any information or requiring significant changes to the design or manufacturing processes.

Key Features of Gerber X2

Gerber X2 introduces several new features and enhancements that set it apart from its predecessor, Extended Gerber. Let’s explore some of the key features that make Gerber X2 a powerful tool for PCB design and manufacturing.

Attribute Data

One of the most significant additions in Gerber X2 is the ability to include attribute data within the Gerber file. Attribute data allows designers to convey additional information about the PCB design, such as layer types, materials, and design intent. This information is embedded directly in the Gerber file using a standardized format, making it easily accessible to manufacturers.

Attribute data in Gerber X2 is represented using a key-value pair syntax. Each attribute consists of a unique name and an associated value. For example, an attribute specifying the layer type could be written as follows:


In this example, %TF.FileFunction is the attribute name, and Copper,L1,Top is the attribute value, indicating that the layer is a top copper layer.

Attribute data can be used to specify various aspects of the PCB design, such as:

  • Layer types (e.g., copper, solder mask, silk screen)
  • Material specifications (e.g., substrate material, copper weight)
  • Drill and hole information
  • Design rules and constraints
  • Component placement and orientation

By including attribute data in the Gerber X2 file, designers can provide manufacturers with a complete and unambiguous description of the PCB design, reducing the chances of misinterpretation and errors.

Embedded Apertures

In Extended Gerber, apertures (shapes used to create PCB FEAtures) are typically defined in a separate aperture list file (e.g., .apr file). Gerber X2 introduces the concept of embedded apertures, where aperture definitions are included directly within the Gerber file itself.

Embedded apertures offer several advantages:

  1. Self-Contained: With embedded apertures, the Gerber file becomes self-contained, eliminating the need for a separate aperture list file. This simplifies file management and reduces the chances of missing or mismatched aperture definitions.

  2. Improved Readability: Embedded apertures make the Gerber file more readable and self-explanatory. Designers and manufacturers can easily understand the apertures used in the design without referring to an external file.

  3. Standardized Format: Gerber X2 defines a standardized format for embedding apertures, ensuring consistency across different design tools and manufacturers.

Embedded apertures in Gerber X2 are defined using the %AD command followed by the aperture definition. For example, a circular aperture with a diameter of 0.5mm can be defined as follows:


In this example, %AD indicates the start of an aperture definition, D10 is the aperture number, C represents a circular aperture, and 0.5 specifies the diameter in millimeters.

By using embedded apertures, Gerber X2 streamlines the PCB fabrication process and reduces the potential for errors caused by mismatched or missing aperture definitions.

Netlist Information

Gerber X2 introduces the ability to include netlist information within the Gerber file. A netlist is a list of electrical connections between components on the PCB. By incorporating netlist information, Gerber X2 enables manufacturers to perform additional checks and validations to ensure the correctness of the PCB design.

Netlist information in Gerber X2 is represented using the %IPNL (IPC Netlist) command followed by the netlist data. The netlist data includes information about the components, pins, and their interconnections. Here’s an example of how netlist information can be included in a Gerber X2 file:

   J1    ,3   ,1   ,R1-1 ,U1-1 *
   J2    ,4   ,1   ,R2-1 ,U1-2 *
   R1    ,1206,2   ,J1-1 ,U1-3 *
   R2    ,1206,2   ,J2-1 ,U1-4 *
   U1    ,SO8 ,4   ,J1-1 ,J2-1 ,R1-2 ,R2-2 *

In this example, the %IPNL command specifies the netlist format version and the number of components and nets. Each subsequent line represents a component, its package type, number of pins, and the connections between its pins and other components.

By including netlist information in the Gerber X2 file, manufacturers can perform automated checks to verify the correctness of the PCB design. This helps catch potential issues early in the fabrication process, reducing the risk of costly errors and delays.

Improved Coordinate Precision

Gerber X2 introduces improved coordinate precision compared to Extended Gerber. While Extended Gerber uses integer coordinates with a fixed resolution, Gerber X2 supports floating-point coordinates, allowing for greater precision in specifying the positions of features on the PCB.

In Gerber X2, coordinates are represented using a format that includes an optional sign, an integer part, a decimal point, and a fractional part. For example, a coordinate of 123.45 millimeters would be represented as follows:


The increased coordinate precision in Gerber X2 enables designers to specify feature locations with greater accuracy, which is particularly important for high-density PCB designs with fine-pitch components and tight tolerances.

Enhanced Metadata

Gerber X2 provides a standardized way to include enhanced metadata within the Gerber file. Metadata refers to additional information about the PCB design that is not directly related to the graphical representation of the layers.

Enhanced metadata in Gerber X2 can include:

  • Design rules and constraints
  • Material specifications
  • Finish requirements
  • Testpoint information
  • Fabrication notes

Metadata is included in the Gerber X2 file using the %TF (Trailer File) command followed by the metadata information. Each piece of metadata is represented as a key-value pair. Here’s an example of how metadata can be included in a Gerber X2 file:


In this example, the metadata specifies the part type, copper material and weight, base material and thickness, number of copper layers, and the order of the copper layers.

By including enhanced metadata in the Gerber X2 file, designers can provide manufacturers with comprehensive information about the PCB design, reducing the need for additional documentation and ensuring that all relevant details are readily available.

Implementing Gerber X2

Implementing Gerber X2 in the PCB design and manufacturing workflow involves a few key steps. Let’s explore how to create, validate, and use Gerber X2 files effectively.

Creating Gerber X2 Files

To create Gerber X2 files, you need a PCB design software that supports the Gerber X2 format. Many popular PCB design tools, such as Altium Designer, KiCad, and Eagle, have integrated support for generating Gerber X2 files.

When generating Gerber X2 files from your PCB design software, ensure that you select the appropriate options to include all the necessary layers, attributes, and metadata. Most design tools provide configuration settings to customize the Gerber X2 output, such as specifying the coordinate format, aperture definitions, and attribute inclusion.

It’s important to review the generated Gerber X2 files to ensure that all the required information is present and correctly formatted. Pay attention to the layer names, aperture definitions, and attribute data to avoid any discrepancies or missing information.

Validating Gerber X2 Files

Before sending Gerber X2 files to the manufacturer, it’s crucial to validate them to catch any potential issues or errors. Validation helps ensure that the Gerber X2 files are correctly formatted, complete, and ready for manufacturing.

There are several tools available for validating Gerber X2 files, such as:

  • PCB Visualizer: A free online tool provided by Ucamco, the company behind the Gerber format, that allows you to visualize and analyze Gerber files.

  • CAM350: A professional PCB CAM (Computer-Aided Manufacturing) software that offers comprehensive Gerber file analysis and verification.

  • GC-Prevue: A standalone Gerber file viewer and analyzer that supports Gerber X2 and provides error checking and design rule validation.

When validating Gerber X2 files, look for the following:

  1. Completeness: Ensure that all the necessary layers and files are present, including the copper layers, solder mask, silk screen, and drill files.

  2. Attribute Data: Verify that the attribute data is correctly formatted and includes all the required information, such as layer types, materials, and design intent.

  3. Aperture Definitions: Check that the aperture definitions are correctly embedded within the Gerber X2 file and match the actual features on the PCB.

  4. Netlist Integrity: If netlist information is included, validate the connections and ensure that there are no missing or incorrect connections.

  5. Design Rules: Verify that the PCB design adheres to the specified design rules and constraints, such as minimum clearances, trace widths, and drill sizes.

By thoroughly validating the Gerber X2 files, you can identify and correct any issues before sending them to the manufacturer, reducing the risk of delays or manufacturing errors.

Using Gerber X2 Files for Manufacturing

Once you have created and validated the Gerber X2 files, you can send them to the PCB manufacturer for fabrication. Gerber X2 files provide a comprehensive and standardized format that manufacturers can readily process and use for manufacturing.

When submitting Gerber X2 files to the manufacturer, include all the necessary files, such as the Gerber X2 files for each layer, drill files, and any additional documentation or instructions. Clearly communicate any specific requirements or expectations to ensure that the manufacturer understands your design intent.

Most PCB manufacturers have automated systems that can directly process Gerber X2 files, extracting the relevant information and using it to set up the manufacturing process. The enhanced data provided by Gerber X2, such as layer types, materials, and design rules, allows manufacturers to streamline their workflows and reduce the need for manual intervention.

By leveraging the capabilities of Gerber X2, you can establish a clear and efficient communication channel with the PCB manufacturer, minimizing the chances of misinterpretation and errors during the fabrication process.

Advantages of Adopting Gerber X2

Adopting Gerber X2 in your PCB design and manufacturing workflow offers several significant advantages over using traditional Gerber formats. Let’s explore some of the key benefits of embracing Gerber X2.

Enhanced Design Communication

One of the primary advantages of Gerber X2 is the enhanced communication it enables between PCB designers and manufacturers. With Gerber X2, designers can convey their design intent, material specifications, and manufacturing requirements directly within the Gerber file itself.

The inclusion of attribute data, such as layer types, materials, and design rules, eliminates the need for separate documentation or extensive back-and-forth communication. Manufacturers can access all the necessary information directly from the Gerber X2 file, reducing the chances of misinterpretation or missing critical details.

This enhanced communication streamlines the PCB fabrication process, as manufacturers have a clear and comprehensive understanding of the designer’s intentions. It minimizes the risk of errors, delays, and costly rework, ultimately leading to faster turnaround times and higher-quality PCBs.

Improved Efficiency and Automation

Gerber X2 enables improved efficiency and automation in the PCB manufacturing process. With the inclusion of embedded apertures, netlist information, and enhanced metadata, manufacturers can automate many aspects of the fabrication workflow.

The standardized format of Gerber X2 allows manufacturers to develop automated systems that can directly process and interpret the Gerber files. These systems can extract the relevant information, such as layer stackup, drill data, and design rules, and use it to set up the manufacturing process with minimal manual intervention.

Automation reduces the time and effort required for PCB fabrication, as manufacturers can streamline their workflows and minimize the need for manual data entry or interpretation. This leads to faster setup times, reduced chances of human errors, and improved overall efficiency in the manufacturing process.

Reduced Errors and Rework

By adopting Gerber X2, you can significantly reduce the occurrence of errors and the need for rework in PCB manufacturing. The comprehensive and standardized nature of Gerber X2 files minimizes the chances of misinterpretation or missing critical information.

With attribute data, embedded apertures, and enhanced metadata readily available in the Gerber X2 file, manufacturers have access to all the necessary details to fabricate the PCB accurately. This reduces the likelihood of mistakes caused by incomplete or ambiguous design data.

Furthermore, the ability to include netlist information in Gerber X2 files allows manufacturers to perform automated checks and validations. These checks help identify potential issues, such as incorrect connections or design rule violations, early in the manufacturing process. Catching and correcting errors before fabrication begins saves time, resources, and costs associated with rework.

By minimizing errors and rework, adopting Gerber X2 leads to higher-quality PCBs, faster turnaround times, and improved customer satisfaction.

Future-Proofing and Standardization

Adopting Gerber X2 is a step towards future-proofing your PCB design and manufacturing processes. As the electronics industry evolves and PCB designs become more complex, having a standardized and comprehensive data format like Gerber X2 becomes increasingly important.

Gerber X2 is an open and well-documented format that is supported by a wide range of PCB design software and manufacturing systems. It represents a collaborative effort between the PCB industry and the Ucamco consortium to establish a common language for PCB fabrication.

By embracing Gerber X2, you align your workflows with industry standards and best practices. This ensures compatibility with modern manufacturing processes and enables seamless collaboration with PCB manufacturers worldwide.

Moreover, as new features and enhancements are introduced to the Gerber X2 format in the future, you can easily adopt them and take advantage of the latest capabilities without significant changes to your existing design and manufacturing workflows.


Gerber X2 represents a significant advancement in the world of PCB design and manufacturing. By extending the capabilities of the Gerber file format, Gerber X2 enables enhanced communication, improved efficiency, and reduced errors in the PCB fabrication process.

With features like attribute data, embedded apertures, netlist information, and enhanced metadata, Gerber X2 provides a comprehensive and standardized way to convey design intent and manufacturing requirements. It streamlines the collaboration between PCB designers and manufacturers, leading to faster turnaround times, higher-quality PCBs, and cost savings.

Adopting Gerber X2 in your PCB design and manufacturing workflow offers numerous benefits, including enhanced