Excellon drill file for PCB manufacturing: format, units and common errors
The drill file tells the manufacturer where every hole goes and how large it is. Here is what it contains and how to avoid the mistakes that delay an order.
What an Excellon drill file is
Gerber files describe the copper, solder mask, silkscreen and outline of a board. They do not describe the holes. Hole positions and diameters travel in a separate text file in the Excellon format, also called NC drill. It has a tool list (each tool is a drill diameter) and, for every tool, the X and Y coordinates of its holes.
The file usually ends in `.drl`, `.xln` or `.txt`; the extension matters less than the content. Open it in a text editor and you will see a short header followed by lines of coordinates.
What the file must say
- Units. The header declares millimetres (METRIC) or inches (INCH). A file without a clear unit can be misread by a factor of 25.4.
- Number format. The header also states how zeros and decimals are written. Leave your CAD tool’s default, but do not edit the file by hand.
- Tool list. One tool per diameter. Specify the finished hole size, because plating reduces the drilled diameter by roughly 0.05 mm (see vias and hole sizes).
- Origin. The drill file must use the same origin as the Gerber files. Otherwise the holes are shifted against the pads.
Plated and non-plated holes
Plated holes (vias, component holes, plated pads) get copper inside the hole. Non-plated holes (mounting holes without a pad ring) stay bare. Export them as two files so each hole gets the right treatment, and name them so we can tell them apart, for example `board-PTH.drl` and `board-NPTH.drl`.
Slots and large cut-outs belong on the outline layer, not in the drill file. Holes larger than 6.4 mm are milled instead of drilled.
How to export it
- KiCad: File → Plot → Generate Drill Files. Choose Excellon format, millimetres, and separate files for plated and non-plated holes. The full steps are in how to open and check Gerber files.
- Altium, EasyEDA, Eagle or Fusion: see export Gerber and drill files from Altium, EasyEDA and Eagle.
Put the drill files in the same ZIP or RAR archive as the Gerber layers and upload the archive in the price calculator.
How to check it before you send it
- Load the Gerber layers and the drill files together in a viewer. Every hole must sit in the middle of a pad or in the clear area it belongs to.
- Compare the tool list with your design: the smallest drill must be at least 0.3 mm and the largest 6.4 mm or less.
- Make sure holes that must be plated are in the plated file and the rest in the other one.
Common errors
| Error | What it causes |
|---|---|
| Plated and non-plated holes in one file | Questions about which holes need plating |
| Inches in one file, millimetres in the other | Holes far off the pads |
| Different origin from the Gerber files | Holes shifted against the pads |
| Missing units in the header | The file may be read at the wrong scale |
| Slots exported as many small holes | A rough slot instead of a milled one |
The DFM checklist covers the rest of the files and the layout rules.
Frequently asked questions
What is an Excellon drill file?
A text file in NC drill format that lists the drill tools (diameters) and the X and Y position of every hole. Gerber files do not carry this information.
Which units should the drill file use?
Millimetres, with the same origin as the Gerber files. The header of the file must declare the unit.
Do I need separate drill files for plated and non-plated holes?
Yes. Separate files let each hole get the right treatment, so keep them apart and specify the finished diameters.
Can I send the drill data inside the Gerber files?
No. Send the Excellon drill files next to the Gerber layers, together in one ZIP or RAR archive.
Browse the questions and answers →
Upload your files and see the price
Add your Gerber files in the calculator: you see the board, the options and an instant price in euros.
Upload files in the calculator →Ask an engineer
Not sure what applies to your board? Describe it in a few lines and our engineers will advise you.