M12 Connector Coding Explained

M12 connectors have become one of the most widely used circular connector standards in industrial automation. You commonly find them in sensors, PLC control cabinets, servo drives, industrial Ethernet switches, and machine vision systems.
However, what truly confuses many engineers is not the connectors themselves, but the coding types. A-coding, D-coding, X-coding, L-coding, … these codings serve not as simple naming rules, but rather as the mechanical keying system within the M12 connector. This system distinguishes between signal, Ethernet, and power applications, while preventing incorrect mating from damaging equipment and networks.
This guide systematically analyzes each M12 coding type, including application scenarios, pin configurations, Ethernet capabilities, and power specifications, to help you choose the appropriate connection method for your system.
1. What Is M12 Connector Coding
M12 connector is a standard industrial circular connector that features a 12 mm threaded locking design. It specifically suits harsh factory environments exposed to vibration and humidity. Its metal housing provides strength and protection. However, the truly crucial element lies in what you don’t immediately see: the internal coding system.
Specific keyway structures and pin arrangements inside the connector interface implement M12 coding. Its core functions include:
- Physical foolproofing: Prevents insertion of power cables into signal interfaces and connection of Ethernet to power circuits.
- Standardization compatibility: Complies with the IEC 61076 series of standards, so that connectors from different manufacturers can safely interchange within the same system.
2. M12 Connector Coding Types
Here are some common coding types for M12 connectors. Let’s break them down one by one.
2.1 A-Coded
A-Code currently stands as the most common M12 connector encoding type. It primarily serves sensors, actuators, industrial control signals, and standard 24V DC low-voltage power supply systems. Additionally, it commonly supports IO-Link and certain field-level industrial communication systems.
Its pin count is flexible, offering configurations from 2 to 17 pins (with 3 to 12 pins appearing most frequently). A single keyway foolproof structure provides excellent anti-misfit performance. Products typically achieve IP65, IP67, or IP68 protection ratings, making them suitable for factory automation, sensor interfaces, PLC peripherals, and industrial field connections.
As one of the most classic and longest-used M12 encoding standards, A-Code has become the most common connection solution in industrial automation because of its high compatibility, compact structure, and stable reliability. However, because A-Code primarily targets signal and low-power transmission, it does not suit high-power power supply or high-speed industrial Ethernet scenarios.
2.2 B-Code
In contrast, the B-Code M12 Connector focuses on industrial fieldbus communication. Engineers widely use it in networks such as Profuse and Interbus for signal and data transmission between PLCs and field devices.
Manufacturers commonly offer it in 2, 4, and 5-pin configurations (5-pin is most common for Profibus). A reverse keyway design helps prevent mismating while allowing you to install multiple connectors on the same panel. Consequently, B-code connectors appear especially common in European industrial automation systems.
B-code mainly operates in traditional fieldbus and non-Ethernet industrial networks. Meanwhile, with the growth of Industrial Ethernet, many applications have gradually transitioned to D-code and X-code solutions. Typical protection ratings reach IP67 for reliable operation in harsh industrial environments.
2.3 D-Code
For Industrial Ethernet at 100 Mbit/s, the D-Code M12 Connector steps in. It optimizes communication for PROFINET, EtherCAT, and EtherNet/IP networks, transmitting data up to 100 Mbit/s over Cat5e industrial Ethernet cables.
Its standard 4-pin design uses two twisted wire pairs, while the internal keying structure reduces crosstalk and electromagnetic interference (EMI), ensuring stable and reliable communication in industrial environments.
D-code connectors populate factory automation networks, PLC communication systems, industrial switches, and field device connections. Typical protection ratings reach IP67.
2.4 X-Code
When applications demand higher speeds, the X-Code M12 Connector delivers high performance for 10 Gbit/s Industrial Ethernet, complying with Cat6A standards.
Its fixed 8-pin structure separates all four data pairs with individual shielding, significantly reducing crosstalk and electromagnetic interference (EMC) for highly stable high-speed communication.
Many X-code connectors support PoE-enabled Industrial Ethernet and serve industrial cameras, machine vision, industrial IoT systems, SCADA networks, smart manufacturing, and advanced automation equipment.
Compared with D-code, X-code provides significantly higher bandwidth and improved EMC performance for modern industrial networking. Therefore, with outstanding EMC performance and high bandwidth capability, X-code is becoming one of the key standards for industrial Gigabit Ethernet. Protection ratings typically reach IP67/IP68.
2.5 L-Code
For high-current DC power, the L-Code M12 Connector specifically targets applications such as DC motors, industrial drives, distributed I/O modules, IO-Link masters, and industrial LED systems.
Its standard design uses a 5-pin (4+FE) configuration, with a rated current typically up to 16 A at 63V DC. This makes it suitable for compact high-current DC power supply applications and enables stable high-current transmission within a compact connector size.
L-code connectors feature a dedicated anti-mismating keyway structure along with excellent vibration resistance and EMC performance. Typical protection ratings reach IP67/IP68, so they fit well in Industry 4.0 and modern industrial automation systems.
2.6 K-Code
Turning to high-power AC, the K-Code M12 Connector serves three-phase AC motors, industrial power distribution, and heavy-duty electrical equipment.
Its standard configuration is typically 5-pin (4+PE), rated up to 630V AC / 12 A (up to 16 A depending on specific design). The connector features a dedicated high-current keying structure for stable and secure power transmission in industrial environments.
K-code connectors commonly provide IP67 protection and suit industrial motor connections, control cabinets, and high-power automation systems. Moreover, compared with C-code, K-code offers higher current capacity and stronger mechanical durability.
2.7 S-Code
Similarly, for single-phase AC power, the S-Code M12 Connector handles industrial heaters, AC motors, power modules, and power distribution systems.
It typically comes in 2+PE or 3+PE configurations, and engineers commonly rate it up to 630V AC / 12 A (up to 16 A depending on specific design). This design optimizes high-load AC power delivery.
Compared with traditional C-code connectors, S-code provides higher current capacity, improved grounding reliability, and better industrial durability. As a result, it has become a mainstream M12 coding type for modern AC power systems.
2.8 T-Code
For medium-power DC requirements, the T-Code M12 connector steps in. It serves industrial motors, drive systems, and DC automation equipment.
It commonly uses a 4-pin configuration with functional grounding support and offers ratings up to 63V / 12 A (up to 16 A depending on specific design). Thus, it represents a practical upgrade over traditional A-code power applications.
The keying structure further enhances grounding reliability and anti-mismating protection, making T-code suitable for industrial equipment requiring stable DC power transmission.
Compared with L-code, T-code provides lower current capacity. However, it offers excellent compatibility in certain motor control and DC drive applications.

2.9 Other M12 Coding Types
Beyond these common codes, several specialized types address niche applications.
M-Code
For instance, the M-Code M12 Connector handles high-current three-phase AC power in servo motors, motor drives, industrial power distribution, and heavy-duty automation equipment.
M-code connectors typically use 5-pin or 6-pin configurations and support higher current transmission compared with standard signal-oriented M12 connectors. Typical ratings reach 630 V AC / 8 A (some products are rated 690 V AC), depending on the connector design. The coding structure provides secure anti-mismating protection for industrial power applications.
Compared with K-code and S-code, M-code often serves in specialized high-power automation systems that require compact connector sizes and reliable power delivery in harsh industrial environments. Typical protection ratings reach IP67/IP68.
C-Code
Meanwhile, the C-Code M12 Connector still finds use in specific AC applications, such as AC sensors, actuators, solenoid valves, and compact AC-driven devices.
Manufacturers typically offer C-code connectors in 3–6 pin configurations, commonly in 2+PE or 3+PE layouts. The dual-keyway structure and extended protective earth (PE) contact improve safety and prevent incorrect mating.
C-code connectors commonly appear in low-voltage AC applications up to 250V AC. They commonly provide IP67 protection and suit industrial power and control applications. However, many modern high-power applications now favor S-code and K-code alternatives.
Y-Code
Finally, the Y-Code M12 Connector combines power and data in a single hybrid interface. It features a hybrid contact layout that merges power contacts (rated up to 50 V / 6 A) and Industrial Ethernet data contacts (rated 0.5 A, Cat 5 performance up to 100 Mbit/s) within one housing.
The internal isolation structure physically separates the power and data sections, helping reduce interference while saving installation space. As a result, this hybrid design reduces cabling complexity and installation space in compact automation equipment. Y-code connectors commonly serve industrial cameras, integrated automation systems, and smart devices that require both power and communication through a single connector.
3. Complete M12 Connector Coding Chart
Below is a comparison table of M12 connector coding types to help you make a quick reference.
M12 Connector Coding Chart
| Code | IEC Standard | Pins | Rated Voltage / Current | Key Applications |
|---|---|---|---|---|
| A | IEC 61076-2-101:2024 (covers A,B,C,D) | 2–17 | 30V – 250V / 1.5A – 4A | Sensors, Actuators, IO-Link, DC Power |
| B | IEC 61076-2-101:2024 | 2, 4, 5 | 60V–250V / 4A | Profibus, Interbus (Fieldbus) |
| C | IEC 61076-2-101:2024 | 3–6 | 250V AC / 4A | AC Sensors, Actuators |
| D | IEC 61076-2-101:2024 | 4 | 250V / 4A | 100 Mbps Industrial Ethernet |
| X | IEC 61076-2-109 | 8 | 50 V AC / 60 V DC, 0.5 A | 10 Gbps Industrial Ethernet |
| L | IEC 61076-2-111 | 5 (4+FE) | 63V DC / 16A | PROFINET Power, DC Power |
| K | IEC 61076-2-111 | 4+PE | 630V AC / 12 A (max. 16 A) | 3-Phase Motors, Power Distribution |
| S | IEC 61076-2-111 | 2+PE / 3+PE | 630V AC / 12 A (max. 16 A) | Single-Phase AC Power |
| T | IEC 61076-2-111 | 4 | 63V DC / 12 A (max. 16 A) | DC Power, Drives |
| M | See note¹ | 5–6 | 630 V AC / 8 A (typical; some 690 V AC) | Servo Motors, Heavy-Duty Power, Robotics |
| Y | IEC 61076-2-113 | 8 (Hybrid) | 50 V / 6 A (Power); 0.5 A (Data) | Power + Industrial Ethernet |
¹ *M-code is not yet defined by a dedicated IEC 61076-2-xxx sub-standard; some sources place it under IEC 61076-2-111 or IEC 61076-2-101. Ratings reflect typical manufacturer specifications.*
4. Conclusion
Choosing the correct M12 code is more than just matching a plug to a socket. It directly impacts the communication stability and electrical safety of the entire automation system. By now, you should have a clear understanding of the purpose of each code type.
In summary, this guide aims to help you select the right M12 connector for your next project, ensuring your automation system runs more reliably and with greater peace of mind. For any further selection questions, please browse our website for additional technical resources or contact our technical team.


