Excellon drill files: plated vs non-plated holes explained
The file that decides which holes get copper
A Gerber set describes images: copper, mask, legend and outline. The holes travel separately, in one or more NC drill files, usually called Excellon files. When the fab plates the board, every hole in the panel gets a copper barrel unless the CAM engineer has marked it as non-plated. That decision is made from your drill data.
Get it wrong in one direction and a mounting hole comes back with a copper barrel, a few tenths of a millimetre smaller than you expected, and shorted to whatever copper surrounds it. Get it wrong in the other direction and a connector pin sits in a bare hole with no connection between layers. Both mistakes are cheap to prevent and expensive to find after assembly.
What an Excellon file actually contains
The name comes from Excellon Automation, which Wikipedia describes as the market leader in PCB drilling and routing machines during the 1980s. Its proprietary format spread with the machines. There are two versions, Excellon 1 and Excellon 2, and Excellon 2 is a superset of IPC-NC-349, the IPC drill and rout standard published in 1985. Excellon Automation no longer publishes the specification, and Wikipedia calls it ambiguous, particularly for coordinates and units.
A minimal file looks like this:
M48
METRIC
T01C0.6
%
G05
T01
X8.5Y4.8
M30
M48 opens the header, METRIC sets millimetres, T01C0.6 declares tool 1 with a 0.6 mm diameter, and % closes the header. After that come the tool selection, the hole coordinates and M30 to end the file.
Notice what is missing. There is a diameter and a position for each hole, and nothing else. Wikipedia's summary of the NC formats says it plainly: they lack essential information such as plating and drill span. A classic Excellon file cannot tell the fab whether a 3.2 mm hole is a plated ground lug or a bare mounting hole.
Ucamco lists two more ambiguities in its paper on the XNC format. There is no standard way to say whether the coordinates are imperial or metric, and the coordinates often lack a decimal point, so the CAM engineer has to try variants until the drill file lines up with the copper. Ucamco also notes that CAD users often put plating information in comments or separate text files, because the NC format has no clean place for it.
How fabs decide when you do not tell them
The usual answer to the missing information is to split the holes into two files: one for plated through holes (PTH) and one for non-plated holes (NPTH). The fab then plates everything in the first file and drills the second one without plating.
Eurocircuits asks for exactly this in its design guidelines: please provide separate drill files for plated and non-plated holes if possible. The alternative it accepts is to use different tools for each type and mark them clearly. Its guidelines also describe what happens when neither is done:
- On 0 and 1 layer boards, all holes are treated as NPTH.
- On 2 layer and multilayer boards, all holes are treated as PTH, except unconnected holes without copper pads, unconnected holes whose pad is no larger than the drill tool, and connected holes that have a pad on only one outer side and no other connection.
Those rules are a guess. A mounting hole with a copper ring for a ground screw can land on either side.
JLCPCB takes a different route. Its capabilities page asks you to draw NPTHs in the mechanical layer or keep out layer, and its NPTH design guide says that an unmarked mechanical hole may get plated and your screw will not fit. Its DFM check flags a mechanical hole that has accidentally been set to plate. Read the fab's own rule before you export.
Why the tolerances differ
A plated hole is drilled oversize, because the copper barrel takes up part of the diameter. A non-plated hole is drilled at its final size. Eurocircuits documents the numbers: drill tool lists are always set to the finished hole size, which it calls ENDSIZE. For PTH the drill is ENDSIZE plus 0.100 mm. For NPTH the drill is ENDSIZE. Its bits come in 0.05 mm steps, so a 31 mil hole (0.7874 mm) becomes 0.80 mm and a 33 mil hole (0.8382 mm) becomes 0.85 mm.
Because plating adds variation, the plated tolerance is wider:
| Fab | Hole type | Finished size | Tolerance |
|---|---|---|---|
| EU Eurocircuits | PTH | up to 4.00 mm | +0.10 / -0.10 mm |
| EU Eurocircuits | PTH | over 4.00 mm | +0.20 / -0.20 mm |
| EU Eurocircuits | NPTH | up to 4.00 mm | +0.05 / -0.05 mm |
| EU Eurocircuits | NPTH | over 4.00 mm | +0.10 / -0.10 mm |
| CN JLCPCB | PTH | all | +0.13 / -0.08 mm |
| CN JLCPCB | NPTH | minimum 0.50 mm | about +/-0.08 mm (NPTH design guide) |
Two practical consequences follow. First, a hole you need to hit precisely, such as a locating pin or a press fit for a plastic stud, is better as NPTH. Second, a hole that ends up in the wrong file is drilled at the wrong size: a mounting hole sent as PTH is drilled 0.1 mm oversize at Eurocircuits and then plated back down, with the wider tolerance on top.
Small holes have their own trap. Eurocircuits treats plated holes with a finished size of 0.45 mm or less as vias by default, and may reduce them by up to 0.30 mm to fix annular ring problems. A component hole at or below that threshold can be mistaken for a via. JLCPCB lists 0.50 mm as the minimum NPTH and suggests designing anything smaller as a plated hole.
Spacing and slots
Eurocircuits asks for at least 0.25 mm between holes, edge to edge, measured on the drill size, and warns against overlapping holes and against building slots from overlapping drills. JLCPCB lists 0.2 mm between vias, 0.45 mm between pad holes, and a 1.0 mm minimum for non-plated slots, drawn on the mechanical or keep out layer.
XNC: plating information inside the drill file
The cleaner fix is to put the plating information into the file itself. That is the purpose of XNC, the Exchange NC format. PCD&F reported in February 2019 that Ucamco, KiCad and Pentalogix had developed it, with support from Graphicode, Cuprum and Zofz. XNC is a strict subset of IPC-NC-349 with the machine control features removed, and its specification is free. The current version on Ucamco's download page is revision 2021.11.
XNC adds attributes in the same scheme as Gerber X2, written as comments so older readers skip them. The specification's example for a plated file is:
; #@! TF.FileFunction,Plated,1,4,PTH
That line says the file contains plated holes running from layer 1 to layer 4. The specification also sets a firm rule: mixed files, with both plated and non-plated holes, are not supported, and drill files are split between plated and non-plated. In other words, the format that was written to remove ambiguity keeps the two-file split. It allows INCH or METRIC units and recommends metric, and it uses rout mode for slots instead of overlapping drills.
Exporting separate files from KiCad
KiCad's command line tool shows the options directly. From the kicad-cli reference for pcb export drill:
| Option | Default | What to set |
|---|---|---|
--excellon-separate-th | off | On, to write plated and non-plated holes to separate files |
--excellon-units | mm | Keep mm, and use the same units as your Gerber files |
--excellon-zeros-format | decimal | Keep decimal, so the coordinates carry an explicit decimal point |
--excellon-oval-format | alternate | Check your fab's preference for slots |
--drill-origin | absolute | Use the same origin as the Gerber export |
--generate-map | off | On, if you want a drill map (PDF by default) to review |
A typical call looks like this:
kicad-cli pcb export drill --excellon-separate-th --generate-map -o fab/ board.kicad_pcb
In the footprint, the pad type decides which file a hole goes to. A screw hole should be an NPTH mechanical pad, and a hole that must carry current or connect layers should be a plated through hole pad. If you use the graphical exporter, the same choices sit in the drill file dialog. Our KiCad 10 Gerber export walkthrough covers the matching Gerber settings so that units and origin agree between the two outputs.
A short check before you upload
- Confirm the ZIP contains two drill files, one plated and one non-plated, or follow the fab's own rule if it wants NPTH drawn on a mechanical layer.
- Open the plated file and look for every mounting hole. If one is there, fix the pad type in the footprint and export again.
- Check that hole sizes in the tool list are finished sizes. The fab adds the plating allowance.
- Look for component holes at or below the fab's via threshold.
- Overlay the drill files on the copper layers and confirm that every hole sits in its pad.
The last step is the one most often skipped. Drop the ZIP into the PCB Tools Gerber viewer to see the drill data on top of the copper, then go through the guide to checking Gerber files before ordering. If the drill file extensions in your archive are unfamiliar, the Gerber file extensions guide lists them. For the wider question of which fabrication format to send, see our comparison of Gerber X2, ODB++ and IPC-2581.
To check hole positions against the pads, open the ZIP in the online Gerber viewer and zoom in on the drill layer.
Sources
- Wikipedia, PCB NC formats
- Ucamco, Gerber and XNC downloads and specifications
- Ucamco, XNC Format Specification, revision 2021.11
- Ucamco, XNC format: Gerber takes data into the future
- PCD&F, CAD software firms develop XNC format for PCB drill data
- Eurocircuits, PCB design guidelines: drilled holes
- JLCPCB, PCB manufacturing and assembly capabilities
- JLCPCB, NPTH design guide
- KiCad, kicad-cli reference (9.0)
Information in this article comes from the public documentation of manufacturers, standards bodies and software vendors as of the publication date and may have changed. Check current conditions with the company concerned before you order. Company and product names are trademarks of their owners; mentions are editorial, with no sponsorship or affiliate relationship. See the terms of use.
Check your Gerbers before you order
Load the ZIP or RAR your EDA tool exported and inspect every layer, drill and outline in the browser. Free, no account.
Open the Gerber viewer