The M12 connector is the workhorse of industrial connectivity. Walk into any modern factory, open a robot controller cabinet, or trace the wiring on an automated assembly line, and you will find M12 circular connectors everywhere. Their compact 12 mm form factor, robust locking mechanism, and IP67/IP68 environmental sealing make them the default choice for sensors, actuators, fieldbus networks, and increasingly, high-speed Industrial Ethernet.
Yet the M12 family is far from simple. Multiple coding variants, pin counts ranging from 3 to 12, and a growing list of data-rate specifications mean that selecting the right M12 connector requires more than just matching a thread size. A sensor cable needs a different coding than an Ethernet backbone. A food-processing washdown zone demands different sealing than a dry control cabinet.
This guide covers everything engineers and procurement teams need to know about M12 connector types, coding systems, pinout configurations, and application-specific selection criteria. Whether you are designing a new industrial automation system or sourcing connectors for a fleet of autonomous vehicles, the information here will help you make the right call.

What Is an M12 Connector?
The M12 connector is a circular, threaded electrical connector with a 12 mm locking nut diameter. It belongs to the family of metric circular connectors standardized under IEC 61076-2-101 and is one of the most widely deployed connector formats in industrial automation worldwide.
The "M12" designation refers to the metric thread size used for the coupling mechanism. When mated, the threaded locking ring provides a secure mechanical connection that resists vibration, shock, and accidental disconnection — critical requirements in factory environments where machinery generates constant movement.
Key characteristics of the M12 circular connector include:
- Compact size: 12 mm outer thread diameter allows high-density installations
- Threaded locking: Positive mechanical retention withstands vibration up to 80g (per IEC 60068-2-6)
- Environmental sealing: IP67 (dust-tight, temporary immersion) or IP68 (continuous submersion) when mated
- Keyed coding: Mechanical polarization prevents cross-mating of incompatible signal types
- Wide pin count range: 3, 4, 5, 8, or 12 contacts depending on the coding variant
The M12 format was originally developed for sensor and actuator connections in the 1980s. Over the decades, the connector family has expanded dramatically. Today, M12 connectors carry everything from simple on/off sensor signals to 10 Gigabit Ethernet data, AC/DC power, and hybrid signal-plus-power combinations.

M12 Connector Coding System
One of the most important concepts in the M12 world is coding. Each M12 coding variant uses a unique mechanical key pattern on the connector interface. This keying serves two purposes: it ensures correct orientation during mating, and it physically prevents you from plugging an Ethernet cable into a sensor port or a power connector into a data jack.
The M12 coding system currently includes eight standardized variants. Here is a complete overview.
| Code | Pin Count | Primary Application | Max Data Rate | Key Standard |
|---|---|---|---|---|
| A-coded | 3, 4, 5, 8, 12 | Sensors, actuators, DC power | 100 Mbps (8-pin) | IEC 61076-2-101 |
| B-coded | 5 | PROFIBUS DP, Interbus | 12 Mbps | IEC 61076-2-101 |
| C-coded | 3, 4, 6+PE | AC power, double-insulated | N/A (power only) | IEC 61076-2-101 |
| D-coded | 4 | Industrial Ethernet (100 Mbps) | 100 Mbps | IEC 61076-2-101 |
| X-coded | 8 | Industrial Ethernet (10 Gbps) | 10 Gbps | IEC 61076-2-109 |
| K-coded | 4, 5 | AC power (up to 630V) | N/A (power only) | IEC 61076-2-111 |
| L-coded | 5 | DC power (up to 63V/16A) | N/A (power only) | IEC 61076-2-111 |
| S-coded | 2, 3, 4 | DC power (up to 630V/16A) | N/A (power only) | IEC 61076-2-010 |
| T-coded | 2, 4 | DC power (up to 63V/16A) | N/A (power only) | IEC 61076-2-010 |
A-Coded M12 Connectors
The A-coded M12 connector is by far the most common variant. It is the standard interface for industrial sensors, actuators, and simple device-level networks. Most 3-wire and 4-wire proximity sensors, photoelectric sensors, and valve manifolds use A-coded M12 connections. The 8-pin A-coded variant also supports 100 Mbps Ethernet in some legacy installations, though D-coded connectors are now preferred for networking.
B-Coded M12 Connectors
B-coded connectors are designed specifically for PROFIBUS DP and Interbus fieldbus networks. They feature a 5-pin configuration with a different key orientation than A-coded connectors, preventing accidental cross-connection between sensor cables and fieldbus cables. As PROFIBUS installations age and migrate toward Ethernet-based protocols, B-coded connectors are becoming less common in new designs.
D-Coded M12 Connectors
The D-coded M12 connector is the standard for 100 Mbps Industrial Ethernet. It uses 4 pins arranged in two twisted pairs, compatible with Cat5e cabling. D-coded M12 connectors are the backbone of PROFINET, EtherNet/IP, and EtherCAT networks running at Fast Ethernet speeds. If your application requires 100 Mbps Ethernet in an M12 form factor, D-coded is the correct choice.
X-Coded M12 Connectors
The X-coded M12 connector represents the high end of M12 data performance. With 8 pins supporting four shielded twisted pairs, X-coded connectors handle Cat6a cabling and data rates up to 10 Gbps. They are essential for machine vision systems, high-bandwidth sensor arrays, and backbone connections in modern smart factories. The X-coded variant uses a unique X-shaped key pattern that is visually distinct from all other M12 codings.
Power Codings: K, L, S, and T
The K-coded, L-coded, S-coded, and T-coded variants address the growing need to deliver power through M12 connectors. K-coded handles AC power up to 630V, while L-coded is optimized for DC power distribution. The newer S-coded and T-coded variants were introduced to support higher-power DC applications, particularly in transportation and heavy industrial equipment where single-cable power delivery simplifies wiring.

M12 Pin Configurations
The M12 connector pinout varies by coding type and pin count. Understanding the correct pin assignment is critical for proper wiring, especially when building custom cable assemblies or troubleshooting field connections.
3-Pin M12 (A-Coded)
The 3-pin configuration is the simplest M12 variant. It is commonly used for 2-wire sensors (NPN or PNP) and basic actuator connections.
- Pin 1: V+ (supply voltage, typically 24V DC)
- Pin 3: V- / 0V (ground)
- Pin 4: Signal output
4-Pin M12 (A-Coded)
The 4-pin A-coded M12 is the most widely used configuration in industrial automation. It supports 3-wire sensors with separate power and signal lines.
- Pin 1: V+ (supply voltage)
- Pin 2: Signal output 2 (or analog output)
- Pin 3: V- / 0V (ground)
- Pin 4: Signal output 1
5-Pin M12 (A-Coded)
The 5-pin variant adds a second signal line or shield connection. It is common for sensors with dual outputs, analog sensors requiring a dedicated shield, or DeviceNet connections.
- Pin 1: V+ (supply voltage)
- Pin 2: Signal output 2
- Pin 3: V- / 0V (ground)
- Pin 4: Signal output 1
- Pin 5: Shield / FE (functional earth)
4-Pin M12 (D-Coded) — Ethernet
The D-coded 4-pin configuration carries 100 Mbps Ethernet using two twisted pairs.
- Pin 1: TD+ (Transmit Data +)
- Pin 2: RD+ (Receive Data +)
- Pin 3: TD- (Transmit Data -)
- Pin 4: RD- (Receive Data -)
8-Pin M12 (X-Coded) — Gigabit/10G Ethernet
The X-coded 8-pin configuration supports Gigabit and 10 Gigabit Ethernet using four twisted pairs.
- Pair 1: Pins 1/2 (TD+/TD-)
- Pair 2: Pins 3/4 (RD+/RD-)
- Pair 3: Pins 5/6 (Data 3+/Data 3-)
- Pair 4: Pins 7/8 (Data 4+/Data 4-)

M12 Connector Types by Mounting Style
Beyond coding and pin count, M12 connector types are also categorized by how they mount to equipment. The mounting style affects installation method, panel space requirements, and serviceability.
| Mounting Type | Description | Best For | Typical Use Case |
|---|---|---|---|
| Panel mount (flange) | Fixed receptacle mounted through a panel cutout | Permanent equipment connections | Control cabinets, junction boxes |
| Cable mount (inline) | Free-hanging connector on a cable end | Point-to-point cable runs | Sensor cables, patch cords |
| PCB mount (through-hole/SMD) | Soldered directly to a circuit board | Embedded electronics | Sensor modules, I/O blocks |
| Field-wireable | Screw or spring terminal for on-site wiring | Field installation without soldering | Maintenance, custom cable lengths |
| Bulkhead (feedthrough) | Panel mount with connectors on both sides | Cable pass-through sealed panels | Enclosure walls, IP-rated cabinets |
Panel mount M12 connectors are the most common type found on industrial equipment. They are permanently installed in a chassis or enclosure and provide a sealed, threaded receptacle for mating cables. Front-mount and rear-mount variants are available depending on whether the connector face is accessible from the outside or inside of the panel.
Cable mount connectors attach to the end of a cable assembly. They come in straight (axial) and right-angle (90-degree) versions. Right-angle cable connectors are particularly useful in tight spaces where a straight connector would protrude too far.
Field-wireable M12 connectors are a practical choice for installations where pre-made cable assemblies are not available or where custom cable lengths are needed. They feature screw terminals or insulation-displacement contacts (IDC) that allow technicians to terminate cables on-site without soldering or crimping tools.
M12 vs M8 vs M16 Connectors
The M12 connector sits in the middle of a family of metric circular connectors. Understanding when to use M8, M12, or M16 helps optimize your design for space, performance, and cost.
| Feature | M8 | M12 | M16 |
|---|---|---|---|
| Thread diameter | 8 mm | 12 mm | 16 mm |
| Max pin count | 8 | 12 | 24 |
| Typical current rating | 2-4A | 4-16A | 7-16A |
| Max data rate | 100 Mbps | 10 Gbps | 10 Gbps |
| IP rating (mated) | IP67 | IP67/IP68 | IP67/IP68 |
| Typical application | Miniature sensors | General industrial | High pin-count, power |
Choose M8 when space is extremely limited and you need only a few low-current signal connections. M8 connectors are common on miniature proximity sensors, small valve manifolds, and compact I/O modules where every millimeter counts.
Choose M12 for the vast majority of industrial applications. The M12 format offers the best balance of size, pin count, current capacity, and data rate support. It is the default choice for sensors, actuators, fieldbus networks, and Industrial Ethernet.
Choose M16 when you need more than 12 contacts, higher current capacity, or larger cable diameters. M16 connectors are found in power distribution, multi-axis motor connections, and applications where a single connector must carry both power and data.
M12 Connectors for Industrial Ethernet
The rise of Industrial Ethernet has been one of the biggest drivers of M12 connector evolution. As factory networks migrate from legacy fieldbuses to Ethernet-based protocols, the demand for M12 Ethernet connectors has grown dramatically.
D-Coded: Fast Ethernet (100 Mbps)
The D-coded M12 connector is the established standard for 100 Mbps Industrial Ethernet. It supports PROFINET, EtherNet/IP, EtherCAT, Modbus TCP, and other protocols running at Fast Ethernet speeds. D-coded connectors use 4 pins (2 twisted pairs) and are compatible with Cat5e cabling.
For most sensor-level and device-level Ethernet connections, D-coded M12 is the right choice. It handles the bandwidth requirements of typical industrial devices — PLCs, I/O modules, drives, and HMIs — with plenty of headroom.
X-Coded: Gigabit and 10 Gigabit Ethernet
The X-coded M12 connector was developed to meet the bandwidth demands of modern smart factories. With 8 pins supporting four shielded twisted pairs, X-coded connectors deliver Cat6a performance in the compact M12 form factor.
X-coded M12 connectors are essential for:
- Machine vision: High-resolution cameras generating hundreds of megabits per second
- Backbone connections: Switch-to-switch links in industrial network infrastructure
- Edge computing: High-bandwidth connections between sensors and edge processing units
- Time-Sensitive Networking (TSN): Deterministic Ethernet requiring Gigabit speeds
The 10 Gbps capability of X-coded M12 connectors future-proofs installations for the next generation of industrial protocols and bandwidth-intensive applications.
Ethernet Cable Compatibility
| M12 Coding | Ethernet Speed | Cable Category | Pairs Used |
|---|---|---|---|
| D-coded | 100 Mbps | Cat5e | 2 pairs |
| X-coded | 1 Gbps | Cat6 | 4 pairs |
| X-coded | 10 Gbps | Cat6a | 4 pairs |
When specifying M12 Ethernet cables, always verify that the cable assembly is rated for the target data rate and that the connector-to-cable transition maintains proper shielding continuity. Poor shielding at the connector interface is the most common cause of Ethernet performance issues in industrial environments.

Key Specifications for M12 Connectors
When evaluating M12 connectors for a specific application, these are the critical specifications to review.
| Parameter | Typical Range | Notes |
|---|---|---|
| Rated voltage | 30V to 630V | Varies by coding; power codings (K, S) reach 630V AC/DC |
| Rated current | 2A to 16A | Per contact; depends on pin count and wire gauge |
| Contact resistance | < 5 mOhm | Initial value; increases slightly over mating cycles |
| Insulation resistance | > 100 MOhm | At 500V DC |
| IP rating (mated) | IP67 / IP68 | IP68 typically rated for 1m depth, 24 hours |
| Operating temperature | -40C to +85C | Extended range (-55C to +125C) available for automotive |
| Mating cycles | 100 to 500 | Depends on manufacturer and plating |
| Vibration resistance | 10-80g | Per IEC 60068-2-6; frequency range 10-2000 Hz |
| Shock resistance | 50-100g | Per IEC 60068-2-27 |
| Cable diameter range | 3.5 mm to 8 mm | Depends on cable gland design |
Environmental Sealing
The IP67 and IP68 ratings of M12 connectors are achieved only when the connector is properly mated and torqued. An unmated M12 receptacle is typically rated IP67 with a protective cap, but only IP20 without one. Always install protective caps on unused M12 ports in harsh environments.
Material and Plating
M12 connector housings are available in nickel-plated brass (standard), stainless steel (food and beverage, marine), and plastic/PBT (lightweight, cost-sensitive applications). Contact plating is typically gold over nickel for signal contacts and silver or tin for power contacts. Gold plating provides lower contact resistance and better corrosion resistance, which is important for low-level signal integrity.
Common Applications
The versatility of the M12 circular connector has made it the standard interface across a wide range of industries.
Factory Automation
M12 connectors are the backbone of factory automation wiring. Every proximity sensor, photoelectric sensor, inductive sensor, and valve manifold on a modern production line typically uses an M12 interface. A-coded 3-pin and 4-pin connectors dominate at the sensor level, while D-coded and X-coded variants handle the Ethernet network infrastructure.
Robotics
Industrial robots and collaborative robots (cobots) rely on M12 connectors for sensor feedback, safety circuits, and network communication. The vibration resistance and secure threaded locking of M12 connectors make them ideal for the constant motion environment of robotic applications.
Transportation
Rail vehicles, commercial trucks, and agricultural equipment use M12 connectors for onboard networks, sensor systems, and power distribution. The extended temperature range (-40C to +125C) and high vibration resistance meet the demanding requirements of automotive and transportation applications. Railway-specific M12 variants comply with EN 50155 for rolling stock electronics.
Food and Beverage
Stainless steel M12 connectors with IP69K ratings withstand the high-pressure, high-temperature washdown cycles common in food processing plants. The smooth, crevice-free design of hygienic M12 connectors prevents bacterial buildup and meets FDA and EHEDG guidelines.
Outdoor Sensors and IoT
Weather stations, environmental monitoring systems, smart agriculture sensors, and industrial IoT gateways use M12 connectors for their IP67/IP68 sealing and reliable performance across wide temperature ranges. The compact size of M12 connectors is well-suited to the small enclosures typical of IoT edge devices.
Machine Vision
High-speed industrial cameras and vision systems increasingly use X-coded M12 connectors for their Gigabit and 10 Gigabit Ethernet interfaces. The shielded X-coded design maintains signal integrity for the high-bandwidth, low-latency data streams that machine vision applications demand.

M12 Connector Selection Guide
Choosing the right M12 connector comes down to matching your application requirements to the correct coding, pin count, and mounting style. Use this decision matrix as a starting point.
Step 1: Determine the signal type.
- Simple sensor/actuator (digital I/O, analog) → A-coded
- PROFIBUS DP fieldbus → B-coded
- 100 Mbps Ethernet (PROFINET, EtherNet/IP) → D-coded
- 1 Gbps or 10 Gbps Ethernet → X-coded
- AC power delivery → C-coded or K-coded
- DC power delivery → L-coded, S-coded, or T-coded
Step 2: Determine the pin count.
- 2-wire sensor → 3-pin
- 3-wire sensor or basic Ethernet → 4-pin
- Sensor with shield or dual output → 5-pin
- Gigabit Ethernet or multi-signal → 8-pin
- High-density signal → 12-pin
Step 3: Determine the mounting style.
- Equipment receptacle → Panel mount
- Cable assembly → Cable mount (straight or right-angle)
- Circuit board integration → PCB mount
- Field installation → Field-wireable
Step 4: Verify environmental requirements.
- Indoor, dry environment → Standard nickel-plated brass, IP67
- Outdoor or wet environment → IP68, consider stainless steel
- Food and beverage washdown → IP69K, stainless steel, EHEDG-compliant
- Extended temperature → Verify -40C to +125C rating
- High vibration → Verify vibration and shock ratings
Step 5: Confirm electrical ratings.
- Verify voltage and current ratings meet your circuit requirements
- For Ethernet, confirm the connector and cable assembly are rated for the target data rate
- For shielded applications, ensure 360-degree shield termination at the connector
Frequently Asked Questions
What does M12 mean on a connector?
The "M12" designation indicates a metric circular connector with a 12 mm diameter locking thread. The "M" stands for metric. The threaded coupling mechanism provides secure, vibration-resistant connections and is standardized under IEC 61076-2-101.
What is the difference between M12 A-coded and D-coded connectors?
A-coded M12 connectors are designed for sensors, actuators, and general-purpose signal connections. D-coded M12 connectors are specifically designed for 100 Mbps Industrial Ethernet. The two types have different mechanical key patterns, so they cannot be cross-mated. If you need Ethernet connectivity, use D-coded (100 Mbps) or X-coded (up to 10 Gbps).
Can M12 connectors carry power?
Yes. While A-coded M12 connectors can carry limited power (typically up to 4A per pin at 24V DC), dedicated power-coded variants are available for higher demands. K-coded connectors handle AC power up to 630V, L-coded handles DC power up to 63V/16A, and the newer S-coded and T-coded variants support DC power up to 630V/16A.
Are M12 connectors waterproof?
M12 connectors are rated IP67 (dust-tight, protected against temporary immersion in water up to 1 meter for 30 minutes) or IP68 (protected against continuous immersion) when properly mated. However, an unmated M12 connector without a protective cap is only rated IP20. Always cap unused ports in wet or dusty environments.
What is the maximum data rate for M12 connectors?
The maximum data rate depends on the coding type. D-coded M12 connectors support up to 100 Mbps (Fast Ethernet). X-coded M12 connectors support up to 10 Gbps (10 Gigabit Ethernet) using Cat6a-rated cable assemblies. For most industrial applications, D-coded at 100 Mbps is sufficient, but machine vision, backbone links, and future-proof installations benefit from X-coded 10 Gbps capability.
CZT manufactures M12 circular connectors for industrial automation, transportation, and IoT applications. With over 30 years of connector engineering experience and ISO 9001/IATF 16949 certified production, we deliver reliable M12 solutions in standard and custom configurations. Request a Quote →



