Indice dei contenuti

How to Generate PCB Gerber Files: A Complete Walkthrough for Altium, KiCad, and Eagle

This article was originally published in Aug 2023 and last updated on August 10, 2026.

Having recently completed your PCB routing, your Produttore di PCBA requests “Gerber files”. You have heard of Gerbers before, but what are they, and how do you export them?
 
Gerber files are an industry-wide standard for describing your circuit board. Each line, each solder mask hole, each silkscreen mark, and each drilled hole is defined by a series of files which the factory will use to create your board. For each design, you need to export not one or two but usually twelve or more Gerber files, one for each layer of your design.
 
However, the process of creating Gerber files is often done improperly. Omitting a layer, misaligning your drill data, or using an old file format version might bring all your work to a halt for many days. This tutorial will take you through each step of creating Gerber files in Altium Designer, KiCad, and Eagle, the three most popular PCB CAD software. It is not just a list of steps but an explanation of each step and the most helpful engineering tips.
How to Generate PCB Gerber Files

Pre-Generation Checklist Before Exporting Gerber

Creating Gerber files is the final phase in the process, but the most crucial part takes place even before opening the export window. A good pre-flight check can help avoid 80% of errors that will later cause problems in the production stage. Here are the five vital things we check before sending the design for manufacturing in our own factory:
 
This is mandatory. DRC checks for any clearance issues, missing connections, and incorrect routing in your PCB design. Make sure your DRC check comes out clean with no errors whatsoever. It is tempting to skip some warnings, but most of the time they turn into real-life errors at the production stage.
  1. Double-check your PCB outline
The board outline layer (Edge.Cuts in KiCad and Board Outline in Altium) should be one single connected line. If there is a small gap or overlap in the outline, the machine in the factory will not know how to route it. We have seen many delays caused simply by the board outline not being completely closed.
  1. Verify proper layer designation
Make sure all copper layers, maschera di saldatura, serigrafia, and paste layers are enabled and properly labelled in your layer stack manager. For the inner layers, make sure they have been set with proper net assignments.
The manufacturer usually sends a capability list in which you find minimum width of tracce, minimum spacing, via diameter, and drill sizes. Make sure that your design adheres to those specifications. If you have doubts, it is always better to ask prior to exporting.
  1. Rebuild copper pours and zones
When using design tools such as KiCad and Altium, copper pours don’t get updated if you make last-minute changes to the routing. Manually perform a refill or rebuild for all copper zones for your Gerber file to reflect the latest changes to your copper planes.
 
These steps must be completed only then you can go on to exporting. This discipline separates professional designers from hobbyists.
Gerber File

Choosing the Right Gerber Format: RS‑274X vs. X2 vs. X3

Now that we know the formats of files, it will be easier for us to understand the steps that are required in the exporting process.
 
  • RS-274X (or Gerber X1): The standard format that is completely self-contained (meaning that all the aperture definitions are included in the file itself). Supported by nearly all PCB manufacturers. This is your best option unless you have any particular reasons.
  • Gerber X2: Introduced in 2014, it is an enhanced version of RS-274X with intelligent metadata like layer description (“this is the top copper layer”) and stackup information. Supported by most modern manufacturers. You should choose it if your manufacturer supports this format.
  • Gerber X3: The latest standard (2020) embeds component placement and distinta base (BOM) information in the Gerber file format, potentially replacing pick-and-place files. While not widely adopted yet, ask your manufacturing facility if it supports this standard.
  • ODB++: An alternate, intelligent, single-file format. Highly functional but not as widespread as Gerber. Most manufacturing facilities like to use Gerber.
 
Our recommendation: Either go with the universal RS-274X format or Gerber X2 format if the latter is accepted by your PCB supplier. Do not use the outdated RS-274D format, which requires separate aperture files.
RS-274-D esempio 2
RS-274-D
Esempio di RS-274-D
Esempio di RS-274-D
Esempio di RS-274X
Esempio di RS-274X

Generating Gerber Files in Altium Designer

Altium Designer is a common software tool that is used in professional settings, and Gerber generation in this software is also reliable. The most important thing is not to get lost among numerous options and leave something crucial out.
 
  1. Load your PCB document – make sure that this is the latest version of the document, which includes the final changes in routing and copper pours.
  2. Create Gerber setup – go to File -> Fabrication Outputs -> Gerber Files. This action will open a multi-tab dialog that you need to fill in.
  3. Set the units and precision – in the General tab set Inches as a unit and 2:5 format (it will give you 0.01 mil of resolution, which is enough for almost any design). Do not use metric units unless your manufacturer specifically asked for them.
  4. Choose layers for plotting – in the Layers tab you can either plot all the layers used in the PCB or you can do it manually. For a typical 4-layer PCB, you should select Top Copper, Inner1, Inner2, Bottom Copper, Top Solder Mask, Bottom Solder Mask, Top Silkscreen, Bottom Silkscreen, Top Paste, Bottom Paste and Board Outline. Altium will assign the standard Protel extensions (e.g., .GTL for top copper, .GBL for bottom copper).
Altium Designer Gerber Setup dialog - General tab with Inches units and 2:5 format selected
Altium Designer Gerber Setup dialog - General tab with Inches units and 2:5 format selected
  1. Advanced options – From the Advanced tab, set the default tolerances for aperture (±0.005mil). Select the option “Suppress leading zeroes” and leave the plotter type as “Unsorted (raster)”. Lastly, check the box “Optimize change location commands” – this reduces the file size without degrading the quality.
  2. Generate the NC Drill files separately – Back to File → Fabrication Outputs → NC Drill Files. Select the same units (Inches) and precision (2:5). The most important thing is to select “Reference to absolute origin” – this makes sure that the coordinates of drilling will fit the Gerber layers perfectly. In case there are plated and non-plated holes in the design, separate drill files must be generated.
  3. Double-check with CAMtastic – After the files are created, Altium automatically opens its own CAM viewer. Make sure to quickly check each of the layers to see if everything is okay.
Pro tip:
Altium lets you save these options into an output job file (.OutJob). After the testing procedure, you can apply the file in future designs to avoid mistakes.
 

Generating Gerber Files in KiCad

KiCad has progressed immensely and exporting Gerber files is now simple. All you need to do is use the new “Plot” dialog which offers maximum control.
 
  1. Open your board file (.kicad_pcb) and do DRC for the last time.
  2. Enter the Plot dialog – Click on File -> Fabrication Outputs -> Gerbers (.gbr). A dialog will appear where you can choose layers and other options.
  3. Choose output directory – It is advisable to use a new, empty directory for this purpose.
KiCad Plot dialog with layer selection and general options for Gerber export
KiCad Plot dialog with layer selection and general options for Gerber export
  1. Select layers – On the left side of the window, select all required layers: F.Cu, In1.Cu, In2.Cu (if any), B.Cu, F.Paste, B.Paste, F.Silkscreen, B.Silkscreen, F.Mask, B.Mask, and especially Edge.Cuts. If you forget about the Edge. Cuts layer, the factory will not be able to determine the shape of your PCB – this is the classic mistake of a beginner.
  2. Specify general options – On the right side of the window, enable “Check zone fills before plotting” – it will update your copper pours automatically. You should also enable “Use Protel filename extensions” – your file names will become easily readable by manufacturers (for example: top.gtl, bottom.gbl). We recommend you also check “Use extended X2 format” – it adds useful layer metadata while remaining backwards compatible.
  3. Plotting of Gerber files – Click the Plot button. It will take seconds to produce all required Gerber files using KiCad.
  4. Creating a drill file – Go back to File → Fabrication Outputs → Drill Files (.drl). Select the appropriate units (inches or millimeters, but follow your manufacturer’s preference), make sure the drill origin is set to “Absolute”, and choose a proper drill map format. Then click on “Generate” and save the file.
  5. Verification process – There is a built-in Gerber viewer (GerbView) in KiCad. It will help you to verify your files.

Pro tip:

“Plot” dialog in KiCad saves your settings. So when you find a good combination for your preferred manufacturer, you can create a new plot preset for one‑click exports in future projects.
 

Generating Gerber Files in Autodesk Eagle

The CAM Processor in Eagle is an application that processes the job files. Though it is somewhat different from the other two, it is just as reliable when you understand how it works.
Autodesk Eagle CAM Processor window with layer mapping and output settings for Gerber generation
Autodesk Eagle CAM Processor window with layer mapping and output settings for Gerber generation
  1. Open the board file (.brd) in the Eagle Board view.
  2. Start the CAM Processor – either by clicking on its icon or through File → CAM Processor. This will open a new window where you will configure your output.
  3. Load or create the CAM job – Eagle includes a default job named gerb274x.cam that creates the RS-274X files. It can be loaded through File → Open → Job. Many Fabbricazione di PCB houses provide CAM jobs for Eagle – using one of them ensures compatibility.
  4. Check the layer mapping – The CAM job automatically selects the layers that it will output. Make sure that all the copper, mask, silkscreen, paste, and outline layers are there. Eagle assigns the layers by number (top copper – layer 1, bottom – 16, outline – 20). If your board uses customized layers, make the necessary corrections.
  5. Set Output Directory – Specify a directory in which to save your Gerber files.
  6. Process the Job – Click on the Process Job button. Eagle will create a series of .gbr files (or any other extension according to the job settings).
  7. Create drill data – The most common type of CAM job is one with an Excellon drill file. However, if not specified in the job, you can always create another layer with drill data using the CAM Processor. Make sure the drill format corresponds to your Gerber precision (usually 2:4 or 2:5 for inches).
  8. Verifica – As Eagle doesn’t have a built-in Gerber viewer, we strongly advise using some external Gerber viewer program (which we will discuss later) to make sure that everything is OK.

Pro tip:

Since Eagle doesn’t refill the copper pours automatically before export, it is recommended to manually create the copper fills by running “Ratsnest” command before starting the CAM Processor. This ensures your Gerber reflects the final copper state.
 

File Naming Conventions

Having created your files, you will end up with a folder containing all the Gerber file extension types such as.GTL,.GBL,.GTS, etc. This is how Protel/Altium names its files and has become the industry standard. Adopting it will enable your manufacturer to know which one goes where, without opening the files.
Here’s a quick reference:
StratoExtension
Top Copper.GTL
Bottom Copper.GBL
Inner Layer 1.G1
Top Solder Mask.GTS
Bottom Solder Mask.GBS
Top Silkscreen.GTO
Bottom Silkscreen.GBO
Top Paste.GTP
Bottom Paste.GBP
Board Outline.GM
Drill File.DRL or .TXT
If your PCBA supplier gives you a custom naming convention, go for it. However, if they don’t, the Protel naming convention is always acceptable. Moreover, don’t use any special characters in file names; underscores (_) are safe.

How to Verify Your Gerber Files Before Submission

Verification cannot be stressed enough. Transmission of incomplete or mismatched files is the number one cause of project delays. Here’s a simple verification process that you can use:
 
  1. File count – For a 2-layer board, you need to have 8 Gerber files at least, plus a drill file. For a 4-layer board, you will need two extra layers of copper. It’s actually very easy to miss a layer – all it takes is counting.
  2. Use a Gerber viewer – Import all your files to the viewer and manually verify each individual layer. We suggest:
    1. KiCad GerbView (free and bundled with KiCad) – highly dependable and supports RS-274X and X2.
    2. HQDFM Online Viewer – cloud-based, no need to install anything, supports many different formats.
    3. EasyEDA Gerber Viewer – fast and convenient for quick checks.
Gerber viewer overlay showing copper, solder mask, silkscreen, and drill layers aligned correctly for a PCB
Gerber viewer overlay showing copper, solder mask, silkscreen, and drill layers aligned correctly for a PCB
  1. Alignment of layers – Enable several layers at once and verify the proper overlap of pads, vias, and board outline. Misalignment usually happens due to the selection of a different origin for Gerber and drill layers.
  2. Mask openings checking – Make sure that the openings of the mask are slightly bigger than the pads (usually the clearance is 2-3 mils) and that there are no fully masked cuscinetti.
  3. Board outline check – The board outline has to be closed polygon. Zoom into corners of the outline – any gap in the outline will make the viewer to display an open path.
  4. Drill-copper layer alignment – Open the drill layer above copper layers in the viewer and make sure that all holes coincide with pads or vias. If not, there is probably a problem with units or coordinate origin.

Common Gerber Errors and How to Avoid Them

Even experienced designers commit these mistakes. The most common mistakes we have observed at our factory, and ways to avoid these are:
 
  • Missing layers – the most common mistake. Always maintain a checklist and use a viewer for verification.
  • Incomplete board outline – A small gap in the Edge. Cuts layer makes it impossible to route the board. Make sure that the outline is a continuous polyline.
  • Using the obsolete RS-274D format – It demands separate aperture files, which are usually overlooked. Use the RS-274X format which embeds all information.
  • Origins of Gerber and drill are different – If your drill file uses “absolute” origin and Gerber “relative” origin, they would not match. Set the same origin for both files (absolute origin is safer).
  • Failing to refill copper pours – This mistake is made more often with Eagle and KiCad tools, where if you do not refill copper, your Gerber file will contain incomplete copper fills. Always run the fill command before export.
  • Drill unit error – Mismatch of inches and mm units in drill file will scale your holes. Check the unit of your drill output.

Final File Package Checklist

Before zipping and sending, run through this list one last time:
  • Gerber files (all layers):
□ All copper layers (top, bottom, inner)
□ Solder mask (top and bottom)
□ Silkscreen (top and bottom)
□ Paste/stencil (top and bottom)
□ Board outline
  • Drill files:
□ Excellon drill file (.drl o .txt)
□ Drill map (optional)
  • Supporting documents (for assembly):
□ Bill of Materials (BOM)
□ Pick‑and‑place centroid file (if you’re using assembly service)
  • Package:
□ All files compressed into a single .zip archive
□ Filenames clear and consistent

Emerging Trends: Gerber X3 and Beyond

Despite RS-274X being the main standard for now, the trend is shifting towards more intelligent solutions. For instance, Gerber X3 (2020) includes component placement and BOM information in Gerber. Likewise, IPC-2581 provides a single-file intelligent solution.
 
Nevertheless, there isn’t always unanimous agreement about using one format. Our recommendation would be to continue using RS-274X or Gerber X2 for your next design while checking whether your manufacturer is working with X3 and trying this format out.

Ready to Submit? Let’s Get Your Boards Manufactured

Since you have already created and verified your Gerber files, you now only need one more step to get your PCBs manufactured. Having neat and thorough files can help you save on time, money, and headaches.
 
If you want a professional evaluation of your files, we also provide a DFM review service for free. Just send us your Gerber files and we’ll make sure there are no errors in them.

Domande frequenti

Some manufacturers accept them, but they invariably convert to Gerber internally. Sending Gerber directly gives you full control and removes any interpretation errors.
A minimum of 8: Top copper, bottom copper, top mask, bottom mask, top silkscreen, bottom silkscreen, board outline, and one drill file.
RS‑274X is universally accepted. X2 adds metadata and is recommended if your manufacturer confirms support.
The factory will issue an Engineering Question (EQ) – this often adds 2‑3 days to your timeline. Proper verification avoids this.

This article was originally published in April 2023 and last updated on July 29, 2026.

Collabora con FS Technology e ottieni un servizio professionale di assemblaggio di schede elettroniche (PCBA).

Blog correlati