Upload BOM & Gerber

Upload BOM and Gerber
Get a Quote Within 12 Hours

Request a PCB / PCBA Quote

What Are PCB Gerber Files? Layers, Data, and Limits

PCB Gerber files are two-dimensional representations that are portable and represent a single board layer or manufacturing function of a PCB. A package for manufacturing PCBs normally includes a number of Gerber representations along with drill files and other documentation that has been agreed upon. Therefore, displaying a clean file in a viewer provides good evidence of the files that were opened, but does not prove that all files necessary to assemble or manufacture the PCB are included in the package.

What Is a PCB Gerber File?

The current specification for Gerber files provides a UTF-8 format for PCB fabrication data. The commands of the file are saved as human-readable text, while the output will be a binary representation in the imaging sense that depicts whether material will be present at a given point in the rendered image.

One Gerber file depicts one complete, resolution-independent representation. The rendered representation may show copper, solder mask or legend, solder paste, board profile, drill or rout objects, component data, or another defined function.

The format developed as an instruction set for photoplotters. The Original Standard Gerber is known by the RS-274D name, which required external aperture information and was revoked in 2014. The Extended Gerber Specification (RS-274X) made each image self-contained. X2 added file, aperture, and object attributes without changing the plotted image. X3, introduced in Revision 2020.09, added two dedicated component layers.

How the Commands Produce an Image

A Gerber file is built up from configuration data, aperture definitions, coordinates, and operation commands; therefore, most simple examples can be explained by the three basic operation codes used to create a Gerber image. Apertures define the shapes used for pads, traces, regions, and other objects, while coordinates place those objects in a two-dimensional Cartesian system.

  • D01 – Plot or draw – using the specified aperture, this code creates an arc or line from the current position to the specified coordinate.
  • D02 – Move – is the operation to change the current position but create no visual object.
  • D03 – Flash – will place one instance of the specified aperture at the specified coordinate, commonly for a drill hit or pad.

These commands demonstrate how text files become visual images, but normally the rendered image is inspected rather than changing location coordinates manually. The standard extension used is .gbr or .GBR; however, Protel-style extensions, such as .gtl and .gbl, are still frequently used, but their meaning is based upon convention and is not a reflection of the current extension standard.

Which Files Belong in a Gerber Package?

To determine which files are to be included in a Gerber package, it is necessary to understand the manufacturing function for each file. For example, using the file-function attributes of X2 gives a clearer indication of file function than using a filename alone to determine the file’s function. Filenames can still serve as supporting evidence, especially when attributes are not exposed.

Which Files Belong in a Gerber Package
FunctionWhat the image representsCommon naming clueRequired or conditionalWhat to check
Top copperConductive features on the top side.gtlRequired when top copper existsTraces, pads, planes, polarity
Inner copperConductive features on an internal layer.g1, .g2, or descriptive nameConditional on layer countLayer order and function
Bottom copperConductive features on the bottom side.gblRequired when bottom copper existsOrientation, pads, planes
Top solder maskOpenings in the top mask coating.gtsNormally required on a masked top sideOpenings and clearances
Bottom solder maskOpenings in the bottom mask coating.gbsConditional on bottom-side maskOpenings and clearances
Top or bottom legendPrinted references and markings.gto, .gboConditionalText orientation and pad overlap
Profile or outlineFinished board boundary and cutouts.gko, .gm1, or descriptive nameRequired for fabricationClosed contour, scale, location
Top or bottom pasteStencil apertures for solder paste.gtp, .gbpConditional on stencil or assembly dataApertures relative to pads

The number of files associated with a PCB depends on which type of PCB it is. For example, there would not be inner copper layer images for a two-layer PCB. Also, if the PCB does not have a bottom-side marking, there would not be a bottom legend included. The paste images are only included with a stencil or assembly package request, and not with every bare PCB order.

Example: A Two-Layer Board Package

A typical two-layer, double-sided PCB with solder mask and top legend may have the following files. The file names are examples, and not meant to be a universal naming standard.

  • PCB_TopCopper.gbr and PCB_BottomCopper.gbr: the conductive images for the top and bottom layers.
  • PCB_TopMask.gbr and PCB_BottomMask.gbr: solder mask opening images for both layers.
  • PCB_TopLegend.gbr: top-side reference designators and markings.
  • PCB_Profile.gbr: closed finished outline with approved internal cutouts.
  • PCB_PTH and PCB_NPTH drill files: plated and non-plated holes in Gerber or an agreed NC format.
  • Fabrication requirements: stack-up, finished thickness, copper weight, material, surface finish, tolerances, impedance requirements, and revision information provided through the Gerber Job or another agreed document.

Where Do Drill, Drawing, and Assembly Data Belong?

Not every file in a PCB archive will be a Gerber image file. Each type of data answers a different question; a filename cannot substitute for the information that must be contained in the file.

Data classPrimary jobCommon carrierWhat it can proveWhat it does not prove
Gerber layer imageTransfer one rendered functionCurrent GerberSupplied geometry, polarity, attributesEditable rules, full schematic intent
Drill and rout dataLocate holes, slots, and routed featuresGerber with X2 attributes or NC dataSupplied hole and route objectsMaterial, stack-up, complete board intent
Job-level dataTransfer stack-up, materials, finish, tolerances, and relationshipsGerber Job JSON, fabrication drawing, stack-up fileRequirements explicitly statedImage geometry unless separately supplied
Native PCB sourcePreserve editable board objects and design intelligenceEDA project and PCB databaseComponents, nets, rules, constraintsA portable fabrication package by itself
Assembly dataDefine parts, placement, variants, programming, and acceptanceBOM, centroid, drawings, program and test filesRequirements explicitly suppliedBare-board geometry not included elsewhere

Drill and Rout Data Can Use Gerber or NC Formats

The current version of the Gerber file type is capable of providing drill and rout layer information. Therefore, as per Ucamco’s specifications for fabrication data, while it is recommended that the Gerber file standard be used as the basis for fabrication data because it allows both image and registration information to be contained within one format, many workflows still use separate NC files. KiCad version 10 can export drill file data in either Excellon or Gerber X2 formats. However, it is important to keep plated hole and non-plated hole locations separated in Gerber drill data. Additional data may need to be provided as separate files for other types of holes, such as blind holes, buried holes, backdrills, slots, and rout spans.

Gerber Job and Fabrication Documents Carry Board Requirements

A Gerber Job is a UTF-8 JSON file that uses a .gbrjob file extension. The Gerber Job points to image files and can contain overall board specifications including the material stack-up, design rules, file functions, polarity, thickness, and finish. The Gerber Job file will not include image data, and omitted values remain undefined rather than receiving default values. Other forms of documentation must include the same required board specifications when the Gerber Job is not used to supply these specifications.

Assembly Data Remains a Separate Deliverable

The X3 component layers identify the component’s location, orientation, reference, value, and manufacturer’s part number. The assembly data present within these layers does not automatically replace all additional assembly inputs (i.e., approved BOM, variant rules, substitution instructions, assembly drawings, programming images, test procedures).

How Do Manufacturers Use Gerber Files?

Gerber files are not normally intended to control production machines directly for the final production of PCBs.

How Do Manufacturers Use Gerber Files
  1. Preflight and import the data. CAM software first reads each image, identifies its polarity and its image attributes, and aligns it with the drill, rout, and profile data. All missing and ambiguous requirements must be resolved before continuing with the CAM creation process.
  2. Create Copper Images. CAM creates copper images that define the features that will remain after the imaging and etching processes. The CAM process can create manufacturing allowances in copper images while still preserving the approved connectivity indicated within the copper images.
  3. Create Solder Mask & Legend Images. The images that define solder masks indicate the areas of copper that are to be exposed by the mask. The images that define legends will show the position of text, reference designators, polarity markings, and any other approved markings.
  4. Create Drilling and Profiling Programs. Data representing the holes, slots, cutouts, and finished outline are all converted into a manufacturing program that represents the finished panel with the tools, feed rates, and process controls that all must be satisfied to produce the required panel.
  5. Create Stencils as Required. Stencil images created for top or bottom paste images indicate the apertures of the stencil through which solder paste will be deposited. Stencil paste data is associated with either the assembly or the stencil handoff as opposed to every bare-board package.

How Can You Open and Check Gerber Files?

It is recommended that the files be checked with a Gerber viewer instead of relying on the filename or raw text from within the Gerber files. KiCad GerbView can be used to open RS-274X images and Excellon drill files and display them concurrently within one window. Both Gerbv and Ucamco Reference Gerber Viewer provide a second independent check, as do the differing types of EDA software; many EDA software packages provide their CAM viewers within their own software packages. Opening the archive using a different viewer from the exporting PCB editing program may help uncover export or interpretation issues.

How Can You Open and Check Gerber Files

Five Checks Before Sending the Archive

  1. Identify every function. Check X2 attributes when present, inspect the geometry, and use the filename as supporting evidence.
  2. Render every image individually. Watch for features that should not exist, incorrect polarity, images that have had their image data clipped, empty images, and image data that is at a distance that enlarges the image viewing area.
  3. Register Related Data Overlays. All manufacturing files should use the same offset, no mirroring, a top-to-bottom viewing convention, and 1:1 scale. Copper data, solder mask data, legend data, profile data, and drill data should align with each other without requiring manual adjustments.
  4. Verify Drill, Rout & Profile Images. The holes should align with the pads, slots and cutouts should appear where they were designed to be located, and the finished outline or profile data should appear as a processable closed contour.
  5. Verify project identification and version/revision. Compare available project attributes, filename selections, names of archives, fabrication drawings, and approvals. Individually valid files can still come from different revisions.
A viewer can showA viewer cannot prove
Rendered geometry and polarity in supplied filesThe original schematic intent
File-function and object attributes that are presentRules and constraints that were not exported
Visible registration among layers, profile, and drill dataMaterial, stack-up, finish, or tolerances unless companion data states them
Supplied X3 component objectsThe approved BOM, variants, programming, and complete test plan
Whether the opened files are internally consistentWhether the archive is the authorized project revision

Common Problems to Resolve

  • Coordinates and orientation: conflicting measurements between inch and millimeter data, incorrect fixed-decimal interpretation, inconsistent origin points, unexplained rotation, and a layer that aligns only after manual mirroring.
  • Layer geometry and polarity: missing or duplicate copper functions, reversed plane or mask polarities, copper located outside of boundary outlines, legend over exposed pads, and empty output.
  • Profile and mechanical data: absence of outer contour outlines, self-intersecting outlines, missing internal cutouts, and conflicts between single-board profiles and panel notes.
  • Drill and rout data: holes that are offset from pads, PTH and NPTH intent that cannot be identified, implausibly sized holes, and slots that have been turned into overlapping drill hits that have not been approved.
  • Revision and completeness: mixed revisions or project IDs, out-of-date fabrication instructions, missing required stack-up or finish specifications, and assembly files that do not agree with the bare-board data.

Every discrepancy should be resolved against both the approved PCB project and the manufacturer’s documented import specifications prior to fabrication.

Can Gerber Files Recreate the Original PCB Project?

No. Gerber preserves rendered geometry and selected attributes; it does not contain the complete authoring database or schematic. Native PCB data contains components, pads, nets, classes, layer definitions, design rules, constraints, and editable relationships. Schematics give logical connectivity, hierarchy, and design intent.

Can Gerber Files Recreate the Original PCB Project
  1. Using a viewer allows you to view or measure geometry; the viewer offers the ability to view shapes, coordinates, clearances, or distances.
  2. Using CAM tools or PCB tools allows you to import or reconstruct geometry; the tools may make it possible to convert Gerber objects into editable forms, followed by manual cleanup and verification of the data.
  3. The original project cannot be reconstructed because Gerber files do not restore missing rules, relationships, complete net semantics, component intent, or schematic.

A reconstructed board can support analysis, repair, or migration; however, it is a new engineering artifact and must be validated against known requirements.

How Do You Generate a Reliable Gerber Package?

All outputs must be extracted from the approved PCB revision. You may get a file with the same name from an old archive or have files generated from separate export sessions that render correctly but have discrepancies in coordinates, layer status, drill data, or revisions between the two sources.

How Do You Generate a Reliable Gerber Package
  1. Check that the PCB project is the correct approved project. To confirm, you should review the project ID, revision, output owner, and target manufacturer before exporting.
  2. Select the functions you need. Instead of using a generic file count, pick the files necessary for this board—copper, mask, legend, profile, paste, drill, and others.
  3. Use a single coordinate system. All images and drill data should have the same origin point, unit of measure, 1:1 scale, orientation, and top-to-bottom format.
  4. Generate supporting data together. Create all of the profile, drill or rout data, stack-up, fabrication requirements, and required assembly files from the same approved revision simultaneously.
  5. Create a new archive and review. Use an independent viewer to check that the exported files are overlaid, validate that the holes and profile geometry are accurate, and compare the project/revision information prior to transmission.
Video: ✅ The Right Way to Export Perfect Gerber Files in Altium (Step-by-Step for Engineers) – TechEdKirsch

How Does Gerber Compare With ODB++ and IPC-2581?

Gerber transfers the images used for manufacturing by function one at a time and adds structure to the images through attributes and optional Gerber Job data. ODB++ and IPC-2581 have richer product models that can contain geometry, stack-up, connectivity, components, and other pieces of manufacturing information in one coordinated dataset. They are not simply extensions of Gerber. If a manufacturer is performing automated component-level DFM checks, or a customer is coordinating fabrication and assembly as one dataset, the manufacturer or customer may request ODB++ or IPC-2581; if a shop processes every layer as an image, it may still expect Gerber.

The decision on which to use depends on the quality of the exporter, the ability of the manufacturer to support the format, and the mutually agreed method of handoff. When Gerber formats are employed, the presence of self-contained up-to-date files, clearly defined attributes, matched drill and profile data, and an explicit definition of supporting documentation reduces interpretation risk.

Conclusion

A Gerber file represents only one complete 2D manufacturing image of the PCB, not the original PCB design or the complete production package.

Leave a Reply

Your email address will not be published. Required fields are marked *