Your Guide to Gerber File Extensions in PCB Design

Zachariah Peterson
|  Created: April 8, 2021
Gerber file formats

If you’ve ever used an external Gerber file viewer, or you’ve used some PCB design applications with a built-in Gerber viewer, you know there are different formats and file extensions for Gerber files. Some applications can very nicely reproduce the look and feel of a PCB layout with just a few active layers, such as the Gerber image I’ve shown above from one of our example press-fit connector layouts. The key to building and using these Gerber viewer applications is to understand the various Gerber file extensions and Gerber formats.

What might seem like black magic to new designers is secretly intuitive, and it’s not as if one Gerber file extension is objectively “better” than another. If you’ve ever wanted to decode Gerber file extensions and formats, keep reading to learn more.

Gerber File Extensions vs. File Formats

Gerber files are the de facto industry standard format for encoding a PCB layout data into a format that is usable by vector photoplotters. We’ve discussed what is a Gerber file and the various Gerber formats in other articles on this blog, but we have yet to really dig into the various file extensions for each format. Experienced designers and fabricators have probably decoded the various Gerber file extensions, so this is focused more on newer designers.

To briefly review, what are the standard Gerber file formats, and what do they encode? The two Gerber file formats are the RS-274-X format (released in 1998) and the newer X2 format (released in 2014). These supersede the older RS-274-D format, which is no longer supported by its developer UCAMCO. Both file formats are ASCII human-readable files that can have any extension, and they can be read in a text editor just like other ASCII files.

  • RS-274-X format: A 2D vector image of a specific layer in a PCB layer stackup; this file format includes aperture definitions, XY coordinate locations for draw and flash commands, unit data, special polygon fill commands, and other information needed for PCB fabrication.
  • X2 format: Upgrades on RS-274-X format to include information on layer location, pads and vias, controlled impedance requirements, and other attributes. Upon the 2014 release, UCAMCO declared the earlier RS-274-D standard “technically obsolete” in favor of RS-274-X and X2 because aperture definitions in RS-274-D are not standardized.

One set of these files, as well as drill files, a BOM, centroid files, netlists, and a few other fab & assembly drawing files give your manufacturer everything they need to understand your board. To read more about the pros and cons of each format, read this recent (but still relevant) blog post from Ben Jordan.

To see where the file extensions come into play, it helps to look briefly at an example with a finished PCB layout. I’ll show the set of Gerbers I’ve generated for a product I’m designing, and we’ll be able to see what the Gerber file extensions mean by looking at the Gerber file extensions under both standards.

RS-274-X

The image below shows a set of RS-274-X Gerbers for an example 2-layer PCB. From this list of files, we can see that they all have different extensions. The extension has the general format “GXY”, where X and Y refer to a specific function and/or layer assignment for the particular file. Under the RS-274-X standard, because there are no attributes attached to the file, the correspondence of each file to a specific layer in the PCB occurs through the extension.

Gerber file formats and file extensions
RS-274-X Gerber files all different extensions, and the extension tells a specific viewer/editor program the function of each file.

For RS-274-X Gerbers, you can usually infer the function of each layer simply by looking at the extension. I say “usually” because I’ve received Gerbers as part of projects where the client’s engineer didn’t use the extensions shown above. The data in these files is all ASCII data, so any number of applications can read that data and use it to generate 2D vector images of each layer. If the Gerber viewer/editor application you’re using doesn’t understand the extension format and can’t determine the location in the layer stack, then it will cue up the layers out of order (usually in alphabetical order).

Gerber X2

When you go to create X2 files for your design, you can create a file for each and every layer in the PCB stackup, including mechanical layers. Files will also get generated for drill holes in the design, including for plated and unplated through-holes. The files that you get from your Gerber X2 generator utility will all have the .GBR extension. Your generator might also give each file a name that matches its name in your PCB design software, which might also correspond to its position in the layer stack (depending on how you’ve named your layers).

Gerber file formats GBR extensions
Gerber X2 files all have the .GBR file extension.

In the above image, I’ve outlined the two signal layers in this simple board; there are no plane layers. The rest of the layers contain a set of data needed for fabrication and assembly. These data can be seen in the PCB layout if you know how to use view configurations in your design tools.

This should reveal the value of the X2 format, where things like actual location in the PCB stackup can be encoded as part of the data in the .GBR files. This allows a Gerber viewer utility to rebuild the stackup so that it matches the intended design. This also eliminates the need to apply an intuitive file extension to X2 files, unlike the case of the RS-274-X files.

Which Gerber File Extensions and Format Should You Use?

Truthfully, whenever I need to send in a design for fabrication, and the fabricator specifically asks for Gerbers, I simply create Gerbers in both formats, zip them up in different folders, and I send in everything to the manufacturer. Giving them the option to use either format eliminates a bit of waiting and some back-and-forth emails. I also send in a netlist, NC drill file, BOM, IPC-2158 files, ODB++ files, a set of fab & assembly drawings, pick-and-place data, PDFs with schematics, and a STEP model of the board. If you send them everything and you keep it clearly organized in different folders, the fabricator will be able to choose exactly what they need and they can get the board into production quickly.

When you need to share your Gerber files and other fabrication data with your manufacturer or other designers, the easiest way is to use the Altium 365 platform. Using the Project Release feature, all the fabrication files you’ve generated can be easily shared with your manufacturer. Your manufacturer can then access shared files directly through Altium Designer or through their web browser thanks to Altium 365’s secure platform.

No matter which Gerber file extensions you prefer or what your fabricator demands, you can quickly generate a set of standardized fabrication files using the PCB design and manufacturing tools in Altium Designer®. The Output Job feature automates manufacturing file generation and ensures your documentation is error-free.

When you’ve finished your design, and you want to release files to your manufacturer, the Altium 365™ platform makes it easy to collaborate and share your projects. We have only scratched the surface of what is possible to do with Altium Designer on Altium 365. You can check the product page for a more in-depth feature description or one of the On-Demand Webinars.

About Author

About Author

Zachariah Peterson has an extensive technical background in academia and industry. He currently provides research, design, and marketing services to companies in the electronics industry. Prior to working in the PCB industry, he taught at Portland State University and conducted research on random laser theory, materials, and stability. His background in scientific research spans topics in nanoparticle lasers, electronic and optoelectronic semiconductor devices, environmental sensors, and stochastics. His work has been published in over a dozen peer-reviewed journals and conference proceedings, and he has written 1000+ technical blogs on PCB design for a number of companies. He is a member of IEEE Photonics Society, IEEE Electronics Packaging Society, and the American Physical Society, and he currently serves on the INCITS Quantum Computing Technical Advisory Committee.

most recent articles

Back to Home