M12 Coding Explained: A, B, D, X, Y, K, L, S and T
Nine codings share the M12×1 thread and none of them mate. Which one your device needs is decided by the protocol and the current, not by the pin count.
M12 is a thread, not a connector. Under that 12 mm thread sit at least nine different contact arrangements, and the reason there are nine is that each one carries a different kind of signal. Getting the coding wrong is the most expensive mistake in this connector family, because the two halves will not mate and the error usually surfaces after the panel has been drilled.
The coding decides the protocol
| Coding | Pins | Typical use | Rated |
|---|---|---|---|
| A | 3–8 (17 on request) | Sensors, actuators, IO-Link | 250 V / 4 A (4-pin), 60 V / 2 A (5-pin) |
| B | 5 | PROFIBUS DP, DeviceNet | 60 V / 4 A |
| C | 3 | AC sensors (legacy) | 250 V |
| D | 4 | 100 Mbps Ethernet (PROFINET, EtherCAT) | 60 V / 1.5 A |
| X | 8 | CAT6A, 10 Gbps Ethernet | 50 V / 0.5 A |
| Y | 8 | Hybrid Ethernet + 24 V power | 60 V |
| K, L, S, T | 4–5 | M12 power (DC 63 V, up to 16 A) | 63 V / 12–16 A |
The pins are not the information. An 8-pin A-coded and an 8-pin X-coded connector share a thread and a pin count and will not mate, because the keyway and the contact circle are rotated.
Three practical decisions
Sensor or network. If the device speaks 100 Mbps over two pairs, it is D-coded — that is what PROFINET and EtherCAT actually run on. X-coded exists for CAT6A and 1 Gbps. Putting an X-coded connector on a 100 Mbps device buys a stiffer cable and a bigger cut-out for no bandwidth.
Power on M12. A-coded carries 4 A. If you need 12 or 16 A on M12, that is the K/L/S/T power codings, which use larger contacts in the same shell. Do not push 16 A through an A-coded insert because the datasheet headline says “M12”.
Hybrid where two cables would hurt. Y-coded puts Ethernet and 24 V in one shell. It saves a gland, a run and a cut-out — at the cost of staying at 100 Mbps, because only two pairs are available for data.
How to specify it without ambiguity
Write the coding, the pin count and the standard together:
M12 A-coded, 5-pin, IEC 61076-2-101, IP67 mated, 60 V / 2 A
Any two of those three will eventually be misinterpreted. A supplier who answers “M12 5-pin” without asking for the coding is telling you something about how carefully the rest of the order will be read.
A note on the 4-pin and 5-pin rating gap
The 4-pin A-coded part is rated 250 V / 4 A. The 5-pin is 60 V / 2 A. Nothing about the plastic changed — the fifth contact reduces the spacing between live parts, and the standard follows the spacing. If a drawing assumed the 4-pin numbers and the BOM calls out the 5-pin part, the circuit may be out of rating before the first unit ships.
Need this built to your drawing?
Send the drawing, the gauge and the annual volume — we quote within one working day and sign an NDA before drawings change hands.