What Is an M12 Connector? Complete Guide
Complete guide to M12 connectors: definition, key specifications, coding types (A/B/D/X), pin configurations, and industrial applications.
What Is an M12 Connector? Complete Guide
Quick AnswerOn this page
Quick Answer
An M12 connector is a circular industrial connector with a 12 mm metric locking thread, standardized under IEC 61076-2-101. It provides a rugged, vibration-resistant and sealed connection — typically rated IP67, IP68 or IP69K once mated — for sensors, actuators, power and network links in industrial automation. M12 connectors come in several coding types (A, B, D, X and others) and pin counts from 3 to 17, so the same compact form factor can carry anything from a basic sensor signal to 10 Gigabit Ethernet.
What Is an M12 Connector?
So what is an M12 connector, exactly? The name describes the coupling, not the electronics inside. "M" stands for metric and "12" is the diameter of the threaded coupling in millimetres, with a thread pitch of M12 x 1. In other words, an M12 connector is any circular connector that mates through a 12 mm screw thread, regardless of how many contacts it holds or what signals it carries.
That threaded coupling is the defining feature. A cable-side connector is screwed onto the mating device socket and tightened by hand, or to a defined torque, which pulls the two halves together, compresses an O-ring seal, and locks the joint against vibration. This is why M12 connectors are trusted on machines that shake, move and get washed down: the connection cannot work itself loose the way a simple push-fit can, and the compressed seal keeps moisture and dust out. Some variants also offer a fast push-pull locking mechanism for situations where tool-free, quick mating matters more than maximum vibration resistance.
Mechanically, every M12 connector shares the same anatomy: a coupling nut carrying the M12 thread, an insulating insert that holds the contacts in a fixed pattern, the contacts themselves, and a sealing system of O-rings and grommets. Connectors are defined by gender — a male connector carries pins, a female connector carries sockets — and by mounting style, such as cable (field-wireable or overmoulded cordset), panel or front mount, and PCB mount. The body may be straight or right-angled to suit tight installations.
The M12 belongs to a family of metric circular connectors that also includes the smaller M5 and M8 and the larger M23. The M12 has become the dominant size in factory automation because it strikes a practical balance: small enough to fit on a compact sensor, yet large enough to carry up to 17 contacts, useful current and voltage, and high-speed data. Where an M8 may run out of contacts or current headroom and an M23 is bulky and expensive, the M12 covers the broad middle ground that most automation devices live in.
Crucially, M12 connectors are standardized. The geometry, contact arrangements and performance requirements are governed by IEC 61076-2-101, with related parts of the standard defining individual codings. Standardization is what makes the ecosystem work: an M12 cordset from one supplier reliably mates with a sensor or I/O block from another, as long as the coding, pin count and gender match. That interoperability is a large part of why the M12 has been so widely adopted across the automation industry.
Key Benefits of M12 Connectors
Several practical advantages explain why the M12 has become the default circular connector in industrial automation.
The first is mechanical reliability. The threaded coupling locks the connection and compresses a seal, so it resists the vibration, shock and accidental knocks that are routine on moving machinery. Connections do not back out over time, which dramatically reduces intermittent faults — the kind of failures that are hardest to diagnose on a production line.
The second is environmental sealing. A mated, tightened M12 connector typically achieves IP67 or IP68, and purpose-built parts reach IP69K, so the same connector can sit on an outdoor mast, inside a coolant-soaked machine, or on a food line cleaned daily with high-pressure hot water. Protection that holds up to washdown is a genuine differentiator over board-level or consumer connectors.
The third is versatility from a single form factor. Through its range of codings and pin counts, the M12 carries sensor signals, fieldbus, 10 Gigabit Ethernet, and DC or AC power — all in the same 12 mm body. Designers can wire an entire machine with one connector family, which simplifies design, panel layout, sourcing and the spare-parts inventory.
The fourth is standardization and availability. Because M12 connectors follow IEC 61076-2-101, parts from different manufacturers interoperate, second sources are easy to find, and cordsets are stocked worldwide. That keeps prices competitive and makes maintenance fast: a failed cordset is replaced with an off-the-shelf equivalent rather than a proprietary special.
Finally, the M12 is service-friendly. Field-wireable and pre-moulded options, straight and angled bodies, and clear coding all make installation and maintenance quick and error-resistant, even for technicians working in cramped or awkward locations.
Key Specifications
At a glance, here are the core specifications of the M12 connectors covered on this site. The values below are drawn directly from our connector data, so they reflect real, available parts rather than theoretical limits.
| Thread standard | M12 × 1 — IEC 61076-2-101 |
|---|---|
| Coding types | A, B, C, D, K, T, X (7) |
| Pin counts | 3–17 pins |
| Rated current | up to 16 A |
| Rated voltage | up to 630 V |
| Protection | IP67 / IP68 / IP69K |
| Temperature range | -40 to +85 °C |
| Mating cycles | ≥ 100 |
These figures span the full range across codings and variants — an individual part will have specific ratings within them. Signal-oriented A-coded connectors carry modest current, while T- and K-coded power connectors are built for higher current, and X-coded connectors prioritise data bandwidth over current. Mechanical endurance is typically rated in mating cycles, and the wide operating temperature range reflects the harsh environments these connectors are designed for. Always confirm the rating of the specific connector you select against your application, rather than assuming the maximum across the family. For the full breakdown of current, voltage, temperature and IP by coding, see the M12 connector specifications guide.
M12 Coding Types
Coding is the single most important concept when choosing an M12 connector. "Coding" refers to the keyed shape of the insulating insert and contact layout: it mechanically prevents connectors intended for different purposes from being mated together. You physically cannot plug a PROFIBUS B-coded connector into a sensor A-coded socket, which protects equipment from miswiring and prevents, for example, a power conductor from ever reaching a signal input.
Each coding is optimised for an electrical role — general signals, fieldbus, industrial Ethernet, or power — and each supports only certain pin counts that suit that role. The four codings you will meet most often are summarised below.
A · A-Coded
Most common. Used for sensors, actuators, and general I/O.
Pins: 3, 4, 5, 8, 12, 17 · Proximity sensors, Photoelectric sensors
B · B-Coded
Used for PROFIBUS fieldbus connections.
Pins: 5 · PROFIBUS DP, Fieldbus
D · D-Coded
100Mbps Industrial Ethernet (PROFINET, EtherNet/IP).
Pins: 4 · PROFINET, EtherNet/IP
X · X-Coded
10Gbps Industrial Ethernet (10GbE, EtherCAT).
Pins: 8 · 10GbE, EtherCAT
Beyond these four, the M12 family also includes C-coding (AC power), K-coding (AC/DC power at higher current), and T-coding (DC power, often for motor and supply connections). Because each coding supports only certain pin counts and a specific job, choosing the coding is effectively choosing the connector's purpose: it pins down the protocol or power role, the compatible mating parts, and the realistic range of pin counts in one decision. For a full, side-by-side comparison of every coding type, see our dedicated M12 connector types guide.
Pin Configurations
M12 connectors are available with 3, 4, 5, 8, 12 and 17 contacts, and the right count depends on what you need to carry. A 3-pin or 4-pin A-coded connector is the workhorse for two- and three-wire sensors and simple actuators, carrying supply and one or two switching signals. A 5-pin connector adds a contact for an extra signal, a functional earth or shield, or fieldbus use, which is why it is so common on devices that combine I/O with diagnostics.
Higher-density 8-, 12- and 17-pin connectors serve multi-channel I/O blocks, complex actuators, and devices that combine power with several signals in a single coupling. As pin count rises, individual contacts become smaller, so current per contact is generally lower — another reason the rating of the specific part matters more than the family maximum.
It is important to understand that the pinout — which signal sits on which contact — is tied to the coding, not just the pin count. A 4-pin D-coded Ethernet connector and a 4-pin A-coded sensor connector both have four contacts, but their pin assignments and intended signals are completely different. Even the direction of numbering and the male-versus-female mirror image trip people up. Using the wrong pinout is one of the most common causes of an installation that does not work or, worse, that damages a device, so the assignment should always be verified against the standard before wiring or crimping.
Because pin numbering and contact positions can be hard to picture from a table alone, we built an interactive tool. Use the Pinout Viewer to see exact pin assignments for each coding and pin count, switch between male and female views, and highlight individual contacts. For a fuller explanation of how M12 pinouts work, see the M12 connector pinout guide. Both are the fastest way to confirm a pinout before you crimp a cordset or place an order.
M12 vs M8 and M23: Picking the Right Size
The M12 sits in the middle of a family of metric circular connectors, and knowing its neighbours helps confirm it is the right choice. The M8 (and the even smaller M5) uses an 8 mm thread and a smaller body. It carries fewer contacts and lower current, which makes it ideal for very compact sensors and tight installations where an M12 simply will not fit — at the cost of less capacity and, in some forms, lower mechanical robustness.
The M23 uses a much larger 23 mm thread and a far bigger body. It accommodates high contact counts and significantly higher current, which is why it is favoured for servo motor power and feedback, and for heavy power distribution. The trade-off is size, weight and cost: an M23 is overkill on a typical sensor or network port.
The M12 covers the broad middle ground that most automation devices occupy. It offers enough contacts (up to 17), useful current and voltage, sealed and locked performance, and high-speed data support — all in a body small enough for compact equipment yet large enough to be practical. As a rule of thumb: drop to M8 only when space is critical and the load is light, step up to M23 only when you need high power or very high contact counts, and reach for M12 for almost everything in between. For a full side-by-side, see M12 vs M8 and M12 vs M23.
Common Applications
The M12 connector is everywhere in modern factories because it solves a recurring problem: making reliable electrical connections on equipment that is exposed to vibration, moisture, dust and frequent washdown. Its sealed, threaded design holds up where consumer-grade connectors would quickly fail.
In sensing and control, A-coded M12 connectors link proximity sensors, photoelectric sensors, encoders and valves to the controller. These are the highest-volume M12 connections in any plant, typically 3-, 4- or 5-pin, carrying low-current signals and sensor power. Because they are so standardized, a maintenance technician can swap a failed sensor cordset in seconds with an off-the-shelf part.
In networking, M12 connectors carry industrial fieldbus and Ethernet right out to the machine. B-coded connectors are the established interface for PROFIBUS, while D-coded connectors handle 100 Mbit industrial Ethernet protocols such as PROFINET and EtherNet/IP. When higher bandwidth is required, X-coded connectors support up to 10 Gigabit Ethernet and protocols like EtherCAT, bringing high-speed data to cameras, drives and edge devices on the factory floor.
In power distribution, dedicated power codings (C for AC, T for DC, and K for higher-current AC/DC) deliver supply voltages to drives, motors and remote I/O blocks using the same rugged form factor. This means a single connector family can wire a whole machine — signals, networks and power — which simplifies design, sourcing and spare parts.
Typical industries include factory and process automation, robotics, packaging, material handling, automated guided vehicles, and food and beverage. In hygienic environments such as food, dairy and pharmaceutical production, equipment is cleaned with high-pressure hot water, which is exactly where higher sealing ratings matter. If your application involves washdown or submersion, review the sealing options in our IP rating guide before specifying a part.
How to Choose an M12 Connector
Selecting the right M12 connector comes down to a handful of decisions, taken in roughly this order.
Start with the coding, because it defines the connector's role and must match the device and protocol. Sensors and general I/O use A-coding; PROFIBUS uses B-coding; PROFINET and 100 Mbit Ethernet use D-coding; 10 Gigabit Ethernet and EtherCAT use X-coding; and power uses C-, T- or K-coding. Getting the coding right also guarantees mechanical compatibility with the mating device, so this single choice resolves much of the selection.
Next, choose the pin count to suit the number of signals or conductors you need to carry, remembering that the available counts depend on the coding. Then confirm the electrical ratings — rated current and voltage — against your load, with particular care for power connectors and for high pin-count parts where current per contact is lower.
After that, specify the sealing, or IP rating. IP67 suits most general industrial and outdoor use, IP68 is for continuous moisture or submersion, and IP69K is for high-pressure, high-temperature washdown. Remember that the rating only applies when the connector is mated and tightened, so plan to cap any unused ports to maintain protection.
Finally, settle the mechanical details: gender (pins or sockets), mounting style (cable, panel or PCB), straight or angled body, and whether you need a pre-moulded cordset or a field-wireable connector. A few mistakes account for most field problems: mixing up the pinout between codings of the same pin count, leaving a port uncapped and losing the IP rating, under-tightening the coupling so the seal does not compress, and specifying a signal connector for a power load. Checking each of these before you order avoids almost all of them.
If you would rather not work through this manually, our connector selector lets you filter the full range by application, protocol, pin count and IP rating to shortlist the right parts in seconds. When you have a candidate, you can request a quote directly from the result.
Frequently asked questions
- What does M12 mean in a connector?
- M12 refers to the connector's locking thread: a circular connector with a 12 mm diameter metric (M) screw thread, pitch M12 x 1. The designation describes the coupling size, not the number of pins. M12 connectors are standardized under IEC 61076-2-101.
- What is an M12 connector used for?
- M12 connectors are used in industrial automation to connect sensors, actuators, power supplies and network devices. Depending on the coding, the same M12 form factor carries simple sensor signals, fieldbus protocols such as PROFIBUS, industrial Ethernet such as PROFINET, EtherNet/IP and EtherCAT, or DC/AC power.
- How many pins does an M12 connector have?
- M12 connectors are available from 3 to 17 pins. Common counts are 3, 4, 5, 8, 12 and 17. The available pin counts depend on the coding type, because each coding is designed for a particular electrical role.
- Are M12 connectors waterproof?
- When correctly mated and tightened to the specified torque, most M12 connectors are rated IP67 or IP68, and some are rated IP69K for high-pressure washdown. An unmated or uncapped port has no rated protection. See our IP rating guide for details.
- What is the difference between male and female M12 connectors?
- A male M12 connector has pins and a female M12 connector has sockets. Gender refers to the contacts, not the threaded coupling. A cable plug and the device socket it mates with must have matching coding and complementary genders.
Need M12 connectors for your project?
Use our selector to find the right part, or send us your requirements for a quote.