Gerber files and drill files are both part of a PCB fabrication package, but they do different jobs. Gerbers are layer images. They describe the shapes to image, etch, print, mask, or route. Drill files are machine instructions for holes and, in many workflows, slots. A fab needs both because copper artwork does not fully define how to drill the board.
This distinction matters most when you are checking a ZIP before an order. A board can appear to have pads and vias in the copper Gerbers, but if the Excellon file is missing or shifted, the manufactured board cannot be drilled correctly. Use the Gerber viewer to overlay the layer images and drill hits together.
For a complete ordering package, pair this guide with what files to send to a PCB manufacturer. That guide covers the surrounding fabrication and assembly files.
Quick answer
Gerber files are 2D layer images for copper, solder mask, silkscreen, paste, and board outline. Excellon drill files list hole locations and tool diameters. The fab needs Gerbers for shapes and drill files for holes, with both using the same origin and coordinate interpretation.
What Gerber files contain
Gerber is the standard image format used for PCB layer artwork. Modern fabrication packages normally use RS-274X or Gerber X2. RS-274X embeds aperture definitions in the file so a CAM system knows how to draw flashes, tracks, regions, and filled shapes. Gerber X2 extends that model with attributes that can identify layer function, pads, vias, and other metadata when the toolchain supports it.
Gerber files are usually one file per layer. Top copper is a Gerber layer. Bottom copper is another. Solder mask openings, silkscreen, paste, fabrication drawings, and board outlines may each be exported as their own files. The format describes 2D vector image data: where copper exists, where mask opens, where ink prints, or where a route profile is drawn.
A copper Gerber can show annular rings around vias and through-hole pads, but those rings are still just copper shapes. They do not define a drill tool table, drill cycle, plating status, or hole diameter in the way a drill machine requires. That is the drill file's job.
What Excellon drill files contain
Excellon drill files describe holes. They list tool diameters and coordinate locations for vias, through-hole component pads, mounting holes, tooling holes, and sometimes slots depending on how the CAD tool exports routed features. A drill file may be accompanied by a drill map or drill report, but the Excellon file is the manufacturing data the fab needs for the drilling process.
Plating status is important. Plated through holes connect copper layers through the board by depositing copper in the hole barrel. Non-plated through holes are mechanical holes without barrel copper, often used for mounting hardware, tooling, or clearance. Some EDA tools export one combined drill file with attributes or comments; others export separate PTH and NPTH files. Follow your manufacturer's preference and make the distinction clear.
How Gerber and drill files align
Gerber and Excellon files align because they share a coordinate system. The same origin, units, and coordinate precision must be used for layer images and drill data. When both exports are generated from the same CAM setup, drill hits should land in the pads and vias shown by the copper layers.
Problems appear when one file is interpreted differently from another. A coordinate format mismatch such as 2:4 versus 2:5 can scale or shift data. Different zero suppression settings can make coordinates ambiguous to older CAM importers. A different drill origin can move every hole by the same offset. These errors are often obvious in a viewer because the holes miss the pad centers.
Gerber vs Excellon reference
| Item | Gerber file | Excellon drill file |
|---|---|---|
| Contains | 2D image shapes, flashes, tracks, regions, and layer artwork. | Hole coordinates, tool diameters, and drill commands. |
| Common format | RS-274X or Gerber X2. | Excellon drill format. |
| Typical count | One file per layer or manufacturing image. | One or more files, often split by PTH and NPTH. |
| Defines | Copper, mask, silk, paste, outline, or drawing geometry. | Where to drill and which tool diameter to use. |
| Does not define | Complete drill tool table or plating intent by itself. | Copper traces, mask openings, silkscreen, or board artwork. |
| Alignment requirement | Same origin, units, and coordinate interpretation as drill. | Same origin, units, and coordinate interpretation as Gerbers. |
Common mistakes to avoid
- Sending Gerbers without drill files because pads are visible in the copper layer. Visible pads are not a drill tool table.
- Exporting drills from a different origin than the Gerbers. The result is usually a consistent offset between holes and pads.
- Losing the NPTH file when PTH and NPTH are separate. Mounting holes and slots can disappear from the fabrication package.
- Assuming Gerber X2 attributes replace every other manufacturing file. X2 metadata helps, but many fabs still expect Excellon drill output.
- Renaming files so aggressively that the fab cannot identify top copper, bottom copper, drill, outline, or plating status.
Check the overlay in the viewer
Open the final ZIP in the Gerber viewer and overlay drill data with top and bottom copper. Holes should sit inside pads and vias with the annular ring you designed. Mounting holes should appear where mechanical drawings and the outline imply they should. If a drill file is missing, shifted, or scaled, regenerate the Gerbers and drills together rather than trying to patch a single file by hand.
For a final pre-order review, continue with the PCB Gerber file checklist. It covers the surrounding issues that are easy to miss once the drill overlay looks correct.
FAQ
- Can a Gerber file define drilled holes by itself?
- A copper Gerber can show pads and annular rings, but the drilling machine still needs drill coordinates and tool diameters. That information is normally provided in Excellon drill files.
- Why does my drill file not line up with the Gerbers?
- The most common causes are different origins, units, zero suppression, or coordinate formats between Gerber and Excellon exports. Regenerate both outputs from the same CAM setup and inspect them together.
- Are plated and non-plated holes in the same drill file?
- They can be, but many workflows export separate PTH and NPTH drill files. Either approach can work if the manufacturer accepts it and the plating status is clear.
- Is Excellon still needed when using Gerber X2?
- Gerber X2 adds useful attributes to Gerber files, but Excellon drill files remain a standard handoff for hole coordinates and tool sizes in many fabrication flows.