Contact Sales & After-Sales Service

Contact & Quotation

  • Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.
  • Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.
Drag & Drop Files, Choose Files to Upload You can upload up to 3 files.

Notes:
For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.

What is Excellon? NC Drill File Format for PCB Manufacturing

Every hole in a printed circuit board starts as a coordinate in a drill file. Whether it’s a 0.3mm via connecting inner layers or a 3.2mm mounting hole, the CNC drilling machine needs precise instructions on where to drill and what size bit to use. That’s where Excellon format comes in—the industry standard NC drill file that’s been guiding PCB drilling operations for over four decades.

This guide explains what Excellon files are, how the format works, and how to generate proper NC drill files from your PCB design software.

What is Excellon Format?

Excellon format is an ASCII text-based file format designed to drive CNC drilling and routing machines used in PCB manufacturing. Named after Excellon Automation Company—the dominant manufacturer of PCB drilling equipment during the 1970s and 1980s—this proprietary format became so widely adopted that it evolved into a de facto industry standard.

An NC drill file (Numerical Control drill file) contains the machine instructions needed to drill every hole in your PCB. It specifies tool diameters, XY coordinates for each hole location, and machine commands that control the drilling sequence. The format is a subset of RS274D, the same G-code family used in general CNC machining.

Almost every PCB design tool can export Excellon format, and virtually every PCB manufacturer’s drilling equipment can read it. This universal compatibility is why the format remains essential despite being decades old.

Excellon 1 vs Excellon 2

Two versions of Excellon format exist, which can cause confusion when files mix commands from both:

VersionDescriptionKey Difference
Excellon 1Original legacy formatDrilling only, simpler commands
Excellon 2Extended formatAdds routing capability, superset of IPC-NC-349

Most modern NC drill files use Excellon 2 format, though commands from both versions sometimes appear in the same file. When submitting files to manufacturers, Excellon 2 is typically assumed unless you specify otherwise.

Structure of an Excellon NC Drill File

An Excellon file consists of two main sections: a header containing job setup information, and a body containing the actual drilling coordinates.

Header Section

The header begins with M48 and ends with either % or M95. It defines critical parameters that the drilling machine needs before starting.

CommandFunctionExample
M48Start of headerM48
INCH/METRICUnit specificationMETRIC,LZ
FMAT,2Format versionFMAT,2
T01C0.3Tool definition (tool 1, 0.3mm)T01C0.300
% or M95End of header%

Tool Definitions

Each drilling tool is defined with a T-code (tool number) followed by C and the diameter:

T01C0.300    ; Tool 1: 0.3mm drillT02C0.400    ; Tool 2: 0.4mm drillT03C0.800    ; Tool 3: 0.8mm drillT04C3.200    ; Tool 4: 3.2mm drill

The diameter represents the finished hole size you require. For plated through-holes (PTH), the manufacturer compensates for copper plating by using a slightly larger drill bit.

Body Section

After the header, the body contains tool selections and hole coordinates:

T01X15000Y20000X15000Y22500X17500Y20000T02X10000Y15000X12500Y15000M30

Each T command selects a tool, and subsequent X and Y coordinates specify where to drill with that tool. The file ends with M30 (end of program).

Coordinate Format and Zero Suppression

The biggest source of confusion with Excellon files is how coordinates are formatted. Without proper settings, holes can end up in completely wrong locations.

Number Format

NC drill files use a format specified as “n,m” where n is digits before the decimal point and m is digits after:

FormatUnitsExample ValueActual Position
2,4InchesX123451.2345 inches
2,5InchesX1234501.23450 inches
3,3MetricX1234512.345 mm
4,4MetricX12345012.3450 mm

Zero Suppression

To reduce file size, Excellon format supports omitting leading or trailing zeros:

SettingCoordinate X001.2345Stored As
NoneFull precisionX00012345
LeadingRemove leading zerosX12345
TrailingRemove trailing zerosX001234

Critical: Your NC drill file’s zero suppression setting must match your Gerber files. Mismatched settings cause drill-to-pad misalignment—holes appear offset from where they should be.

Essential Excellon Commands

Understanding common Excellon commands helps when troubleshooting files or verifying exports.

Header Commands

CommandDescription
M48Start of header
M95 or %End of header
INCHUse inches
METRICUse millimeters
LZLeading zero suppression
TZTrailing zero suppression
FMAT,1Format 1 (drilling only)
FMAT,2Format 2 (drilling and routing)

Body Commands

CommandDescription
T01-T99Select tool number
X…Y…Drill at coordinates
G00Move without drilling
G05Drill mode
G85Slot/routed slot
M15Z-axis down (rout)
M16Z-axis up (rout)
M30End of program

Comment Syntax

Comments in Excellon files start with semicolon and are ignored by machines:

; This is a comment; Tool list for project XYZ

Generating NC Drill Files from PCB Software

Every major PCB design tool exports Excellon format, though the exact process varies.

Export by Software

SoftwareMenu PathNotes
Altium DesignerFile → Fabrication Outputs → NC Drill FilesConfigure format in NC Drill Setup dialog
KiCadFile → Fabrication Outputs → Drill FilesSelect Excellon in format options
EagleCAM Processor → Excellon deviceUse excellon.cam job
OrCAD/AllegroManufacture → NC → NC DrillSet parameters in NC Parameters first
EasyEDAFabrication → Generate PCB Fabrication FileIncluded with Gerber export

Export Settings Checklist

When generating NC drill files, verify these settings match your Gerber output:

SettingRecommendation
FormatExcellon (not Sieb & Meyer)
UnitsMatch Gerber files (INCH or METRIC)
Precision2,4 for inches or 3,3 for metric
Zero suppressionMatch Gerber files exactly
CoordinatesAbsolute (not incremental)
OriginSame as Gerber origin

PTH vs NPTH Drill Files

Modern PCB designs often require separate NC drill files for plated and non-plated holes.

Hole Type Comparison

Hole TypeAbbreviationPlatingTypical Use
Plated Through-HolePTHCopper plated barrelVias, component holes
Non-Plated Through-HoleNPTHNo platingMounting holes, tooling holes

Manufacturers process PTH and NPTH holes differently in their fabrication sequence. Providing separate drill files prevents confusion and ensures correct processing.

Read more PCB Files format:

HDI and Multilayer Considerations

High-Density Interconnect (HDI) boards with blind and buried vias require additional NC drill files:

Via TypeDescriptionDrill File Required
Through-holeDrills all layersMain drill file
Blind viaOuter to inner layerSeparate file per layer pair
Buried viaInner layers onlySeparate file per layer pair

An 8-layer HDI board might need three or more drill files: L1-L2 blind vias, L7-L8 blind vias, and L3-L6 buried vias.

Common Excellon File Problems

NC drill files cause more manufacturing issues than almost any other fabrication file type. Here are the most common problems and solutions.

Missing Tool Definitions

ProblemSymptomSolution
No tool sizes in headerManufacturer can’t determine hole sizesAdd T-code definitions with diameters
Tool file separateTwo files instead of oneMerge tool list into drill file header

Coordinate Misalignment

ProblemCauseSolution
Holes offset from padsZero suppression mismatchMatch settings with Gerber files
Holes scaled wrongUnit mismatchVerify INCH/METRIC matches Gerbers
Holes mirroredOrigin or axis differenceCheck coordinate system settings

Format Recognition

ProblemCauseSolution
Extra holes appearExcellon 1 file read as Excellon 2Specify format version to manufacturer
Commands not recognizedMixed format commandsUse consistent format throughout file

Validating NC Drill Files

Before submitting Excellon files to your manufacturer, validate them using a Gerber viewer.

Verification Steps

  1. Load all Gerber layers plus NC drill file into viewer
  2. Overlay drill file on copper layers
  3. Verify all holes align with pads
  4. Check hole sizes match design intent
  5. Confirm PTH/NPTH separation is correct

Recommended Viewers

ToolPlatformFeatures
GC-PrevueWindowsIndustry standard CAM viewer
GerbvCross-platformFree, open source
KiCad Gerber ViewerCross-platformIncluded with KiCad
ViewMateWindowsFree Gerber/Drill viewer
Online viewersWebJLCPCB, PCBWay offer free viewing

Related Formats and Standards

Excellon isn’t the only format for drill data, though it remains the most common.

Format Comparison

FormatStandardPrimary Use
ExcellonDe factoMost PCB manufacturers
Sieb & MeyerProprietarySome European manufacturers
IPC-NC-349IPC standardFormal specification
XNCConsortiumCAD/CAM data exchange
IPC-2581IPC standardComplete PCB data package

The XNC format, developed by Ucamco, KiCad, and others, addresses Excellon format ambiguities for better CAD-to-CAM data exchange. However, traditional Excellon remains dominant for actual manufacturing.

Useful Resources for NC Drill Files

Documentation

ResourceDescription
IPC-NC-349Official IPC drill format standard
Ucamco XNC SpecificationFree download at ucamco.com
Excellon CNC-7 ManualOriginal format documentation (archived)

Online Tools

ToolURLFunction
JLCPCB Gerber Viewerjlcpcb.comFree online viewing
PCBWay Gerber Viewerpcbway.comFree online viewing
Gerbvgerbv.github.ioOpen source viewer

Frequently Asked Questions About Excellon Files

What file extension do NC drill files use?

Excellon files commonly use extensions like .drl, .xln, .exc, .ncd, or .txt. The extension doesn’t affect functionality—what matters is the file content. Some manufacturers prefer specific extensions, so check their requirements. KiCad exports .drl files, Eagle uses .xln, and Altium can produce various extensions depending on configuration.

Do I need separate drill files for different hole sizes?

No, a single NC drill file contains all hole sizes using different tool definitions (T01, T02, etc.). Each tool number corresponds to a specific drill diameter defined in the header. However, you may need separate files for PTH versus NPTH holes, or for blind/buried vias in HDI designs.

Why do my drilled holes appear in the wrong location?

Misaligned holes almost always result from coordinate format mismatches between your Excellon file and Gerber files. Check that units (inch/metric), zero suppression (leading/trailing), and number format (2,4 vs 3,3) are identical across all files. Also verify the coordinate origin matches.

Can Excellon files specify slot shapes?

Yes, the G85 command creates routed slots by drilling overlapping holes between two coordinates. The slot width equals the drill bit diameter. For more complex routing, Excellon 2 format includes additional routing commands (M15, M16, G01) that control tool plunge and linear movement.

Should I specify finished hole size or drill size?

Always specify the finished hole size you need in your NC drill file. For plated through-holes, the manufacturer automatically compensates for copper plating thickness by using a larger drill. For non-plated holes, they use the exact size specified since no plating will reduce the diameter.

Conclusion

The Excellon format has guided PCB drilling operations since the 1970s, and despite its age, remains the universal standard for NC drill files. Understanding how these files work—from header commands and tool definitions to coordinate formats and zero suppression—helps you avoid the alignment issues and manufacturing delays that plague poorly formatted drill data.

When exporting NC drill files, the critical rule is consistency: your drill file settings must match your Gerber settings exactly. Same units, same zero suppression, same origin. Validate everything in a Gerber viewer before submission, and you’ll have one less thing to worry about when your boards arrive from the fab house.

Leave a Reply

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

Contact Sales & After-Sales Service

Contact & Quotation

  • Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.

  • Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.

Drag & Drop Files, Choose Files to Upload You can upload up to 3 files.

Notes:
For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.