Enter JLCPCB's two-layer minimums on the Constraints page of KiCad 10's Board Setup: 0.10 mm tracks and gaps, 0.15 mm drills, 0.25 mm vias, and 0.2 mm between holes and copper, between via holes and from copper to a routed edge. Route above them with a net class; custom rules cover the rest.
Which JLCPCB figure goes in which KiCad field?
For a two-layer board in 1 oz copper, eight figures from JLCPCB's capabilities page go on the Constraints page of Board Setup, in the File menu. Here they are under the labels KiCad 10 gives those fields, with each one's key in the project file:
- Minimum clearance and Minimum track width: 0.1 mm (
min_clearance,min_track_width). JLCPCB gives 0.10 mm (4 mil) for both on one or two layers; in 2 oz copper, 0.16 mm. - Minimum drill size: 0.15 mm (
min_through_hole_diameter), the smallest of its two-layer drills, which run to 6.3 mm. - Minimum via diameter: 0.25 mm (
min_via_diameter), its smallest via, around a 0.15 mm hole. - Minimum annular width: 0.05 mm (
min_via_annular_width). The page wants a via 0.1 mm wider than its hole, 0.15 mm preferred: 0.05 mm of copper each side. - Copper to hole clearance: 0.2 mm (
min_hole_clearance), from a via hole or a non-plated hole to a track. - Hole to hole clearance: 0.2 mm (
min_hole_to_hole), between via holes. - Copper to edge clearance: 0.2 mm (
min_copper_edge_clearance) from a routed edge; 0.4 mm from a V-cut one.
These are the figures of the JLCPCB profile PCB Agent's DRC runs under, read from that page on 5 October 2026 and unchanged on 30 November 2026.
JLCPCB's two-layer minimums in 1 oz copper on a board fragment, drawn to scale from JLCPCB's capabilities page and labelled with KiCad's fields.
Constraints, net classes and custom rules: which one wins
KiCad keeps Board Setup's settings in the project file, a .kicad_pro of the same name beside the board, and custom rules in a .kicad_dru file. Keep both with the board file.
- Constraints are floors. KiCad's manual calls a minimum there absolute: no net class or custom rule goes below it. For a larger clearance on part of a board, enter the smaller value here and raise it elsewhere.
- Net classes are what you route with: a clearance, a track width and via sizes per class of nets. The manual treats the widths and via sizes as defaults, not limits: a track drawn narrower than its class is no DRC error while it stays above the constraint. The class clearance is checked, never below the constraint's.
- Custom rules say what the other two cannot, for one footprint, net or area. KiCad 10 reads them from the last rule up and stops at the first match, so a specific rule goes below a general one. The file opens with
(version 1). Write them on Board Setup's Custom Rules page and press Check Rule Syntax; the Design Rule Editor, in the Tools menu, saves to the same file.
KiCad applies custom rules only when the whole file is free of errors; in the editor, an error stops DRC from running. From the command line, where our pipeline runs DRC (KiCad Python and Docker shows how), a file with one rule KiCad could not parse was dropped whole, without a message. So our pipeline builds its rules only from fixed constraint names, checked designators and numbers.
Why route above the minimum?
JLCPCB's page gives track width a ±20% tolerance: a 0.1 mm track comes out 0.08 to 0.12 mm wide. A minimum is a floor to check against, not a width to draw.
PCB Agent routes every board with one net class, the project's Default: 0.15 mm tracks and gaps, enough for each pin of a 0.4 mm pitch chip to escape on its own, and 0.6 mm vias with 0.3 mm holes.
In the project our DRC reads, that class has a 0.1375 mm clearance, not 0.15. Freerouting narrows a segment it cannot fit to as little as half the class width, 0.075 mm, and our layout widens any track under JLCPCB's 0.1 mm back to it, moving each edge up to 0.0125 mm toward its neighbour. DRC allows that margin and no more. Our Freerouting article shows where the narrowed segments come from.
Relaxing one footprint without relaxing the board
A footprint can break a fab's rule by its own geometry. On KiCad's footprint for GCT's USB4105 USB-C receptacle, two alignment holes sit 0.194 mm from the pads beside them, under JLCPCB's 0.2 mm. Lowering the board's Copper to hole clearance to 0.19 mm would let that fault pass anywhere.
Since a constraint is a floor, the exception takes three steps. Our pipeline lowers the board's Copper to hole clearance to 0.19 mm. The rules file then puts the fab's 0.2 mm back for every pair, in a first rule with no condition, and ends with the exception, which KiCad reads first. This is the whole file, as the pipeline writes it for the receptacle as J1:
(version 1)
(rule "JLCPCB hole_clearance"
(constraint hole_clearance (min 0.2mm)))
(rule "J1 hole_clearance"
(condition "A.memberOfFootprint('J1') && B.memberOfFootprint('J1')")
(constraint hole_clearance (min 0.19mm)))
memberOfFootprint is true for an item of the footprint with that reference. Asked of both items, A and B, it keeps the exception between the receptacle's own pads and holes; a track beside those holes is still held to 0.2 mm. The receptacle's module carries the exception with its reason, and nothing else is relaxed.
An integration test proves KiCad reads it. Laid out alone under JLCPCB's rules, the receptacle's module fails DRC with four hole clearance errors. Given the same exception under another part's designator, which lowers the floor just as much, it still fails with four. Given its own, it passes. Test your own rules the same way, by breaking one on purpose; Clearance Resolution, in the Inspect menu, shows which rule set a clearance.
How the rules are tested on every board
Before KiCad's DRC runs, our pipeline writes the project file beside the board, and a rules file only when a part needs an exception.
- Every routed attempt of a layout is checked under them, and a board goes on only when KiCad's DRC finds no error and no unconnected item. Warnings are reported and stop nothing.
- Every module of our library is laid out alone and found DRC-clean under both our fab profiles, this one and the one below.
- The KiCad project a job delivers carries the same rules, so KiCad 10's own DRC checks the board as the pipeline did.
What one number per field cannot say
Each constraint holds one number for a whole kind of distance, and four of JLCPCB's figures are stricter than the one entered:
- 0.28 mm from a plated through-hole to a track, 0.35 mm recommended, where a via hole needs 0.2 mm;
- 0.45 mm between pad holes, where via holes need 0.2 mm;
- 0.15 mm between SMD pads of different nets, above the 0.10 mm clearance;
- at least 0.18 mm of annular ring around a plated through-hole in two-layer 1 oz boards, 0.25 mm recommended, where a via's is 0.05 mm.
Each takes a custom rule whose condition picks the items by type, as the manual's examples do with A.Pad_Type == 'Through-hole' and A.Type == 'Via'. Our profile holds none of the four yet, so a board that passes its DRC has not been checked against them.
A second fab's profile
Our pipeline keeps one more profile, from PCBWay's capabilities page, read the same day: the same 0.1 mm tracks and gaps and 0.15 mm drills, but a 0.15 mm annular ring, so its smallest via is 0.45 mm. It also keeps via holes 0.28 mm apart and copper 0.25 mm from the edge, figures from the page's table for advanced boards.
A board is checked under one profile, JLCPCB's unless the pipeline is set to another. Copper that must pass under both takes the stricter figure: an edge rule for a module with an antenna keeps the board edge at least 0.25 mm from its pads' copper, and the second router, which finishes what Freerouting leaves, adds nothing nearer than 0.28 mm between holes or 0.25 mm to the edge.
Limits
This covers JLCPCB's figures for two-layer boards in 1 oz copper; more layers, heavier copper and the 0.1 mm holes it drills only in thin boards have their own. A fab revises its capabilities, so read its page again before you order. Assembly rules, set by the assembler for parts, pads and files, are not covered. Our DRC leaves silkscreen and solder mask at KiCad's own settings, as warnings, and does not hold the four stricter figures above yet. A board that passes these rules has still to be built to be tested; the roadmap says where PCB Agent's own boards stand. KiCad fabrication files covers what to send once DRC passes, and Can AI design a PCB? what DRC cannot see.
Sources
- Rigid PCB Manufacturing Capabilities, JLCPCB
- PCB Editor: Board Setup constraints, KiCad 10.0 documentation
- PCB Editor: net classes, KiCad 10.0 documentation
- PCB Editor: custom design rules, KiCad 10.0 documentation
- Board Setup's Constraints panel, KiCad 10.0 source, KiCad on GitLab
- PCB Capabilities, PCBWay


