M12 Connectors & Cordsets

M12 Cordsets, Receptacles and Connectors for Sensor, Ethernet and Power Connections

This category covers every M12 connectivity product Automation Distribution carries: molded cordsets, M12 to RJ45 Ethernet cables, panel mount receptacles, field wireable connectors, splitters, passive junction boxes, and the caps and torque tools that keep them sealed. As an authorized distributor for Turck, Leuze, Baumer, WAGO, SensoPart, and other connectivity brands, Automation Distribution lets you compare M12 options across manufacturers in one place.

Start with the coding your device port uses (A for sensors and I/O, D or X for Industrial Ethernet, L, S, T or K for power). Then choose the product type, and narrow by pin count, gender, orientation, cable length, and jacket material. Not sure which coding you have? See the M12 coding guide below the product list.

Shop by Product Type

M12 Coding Guide: Match the Connector to the Job

The coding is the keying pattern molded into the M12 face. It tells you what the connection carries (signal, Ethernet data, or power) and physically stops a plug from mating with the wrong socket. Codings are not interchangeable, so confirm the coding on the device datasheet before you choose pin count, length, or jacket.

Coding Carries Pin counts in this category Typical uses
A-codedSignals and low-power DC3, 4, 5, 8, 12Proximity and photoelectric sensors, valves, I/O blocks, IO-Link, DeviceNet and CANopen
B-codedFieldbus data2, 4, 5PROFIBUS networks
D-codedIndustrial Ethernet up to 100 Mbit/s4PROFINET, EtherNet/IP, and EtherCAT field devices; M12 to RJ45 cordsets
X-codedIndustrial Ethernet up to 10 Gbit/s8Machine vision cameras, Gigabit backbones, Cat6A runs
L-codedDC power4 + FE, 5Power distribution to PROFINET and EtherNet/IP I/O blocks and field devices
T-codedDC power4Compact DC power feeds to field devices
S-coded and K-codedAC power3 + PE (S), 4 + PE (K)Motors, small drives, and other AC loads

Ratings vary by manufacturer and part. For example, Turck's L-coded M12 power family carries up to 14 A, and its L-coded receptacles are rated 63 V. Always confirm voltage and current on the datasheet for the exact part number.

Choosing an M12 Cordset

Decision Options How to choose
EndsSingle-ended, double-endedSingle-ended when the far end lands on terminals in a panel. Double-ended when both the device and the I/O block, switch, or junction box have M12 ports.
GenderFemale (socket), male (plug)Match the opposite of the device port. Most sensors have a male M12 port, so the device end of the cordset is female.
OrientationStraight, right-angleRight-angle heads save space where the cable has to turn tight against a bracket, guard, or I/O block.
JacketPVC, PUR, TPEPVC for general fixed wiring. PUR is the common choice for drag chains and moving cables. TPE is used on many Turck Ethernet and power cordsets. Check the datasheet for drag-chain, oil, weld-spatter, and washdown ratings.
ShieldingUnshielded, shieldedUse shielded cable for Ethernet, fieldbus, encoder, and analog signals, and anywhere near drives and motor leads.
LengthFixed lengths per partMeasure the routed path, not the straight-line distance. For a length that isn't offered, pair a field wireable connector with bulk cable.

Ordering Tips That Prevent Returns

  • Coding first, then pins. A 4-pin D-coded Ethernet cordset will not mate with a 4-pin A-coded sensor port, even though the pin count matches.
  • Check the pin count on both ends. Y-splitters, M12 to M8 cables, and adapter cables often change pin count from one end to the other.
  • Ethernet speed sets the coding. Use D-coded for 100 Mbit/s networks and X-coded for Gigabit devices such as vision cameras. For cabinet switches, choose an M12 to RJ45 cordset.
  • Seal unused ports and torque the coupling nut. Protective caps keep open ports at their rated protection class. Baumer specifies 0.6 Nm for its M12 coupling nuts, and torque sleeves and torque wrench sets in the Adapters and Accessories category help crews tighten to spec.
  • Power codings are not interchangeable. L, T, S, and K-coded connectors are keyed differently, so match the coding printed on the device or the power supply.

M12 Connector FAQ

What does the coding on an M12 connector mean?

The coding is the keying pattern on the connector face, identified by a letter such as A, B, D, X, or L. Each coding is assigned to a type of connection: A-coded for sensors and I/O, B-coded for PROFIBUS, D and X-coded for Industrial Ethernet, and L, T, S, and K-coded for power. The keying prevents a plug from mating with a socket of a different coding.

What is the difference between D-coded and X-coded M12?

D-coded M12 is a 4-pin connector for Industrial Ethernet up to 100 Mbit/s, used on most PROFINET, EtherNet/IP, and EtherCAT field devices. X-coded M12 is an 8-pin connector that supports Ethernet up to 10 Gbit/s over Cat6A cable, which makes it the standard for Gigabit devices such as machine vision cameras. The two are keyed differently and cannot be mated.

Which M12 coding is used for PROFINET?

PROFINET data connections on field devices typically use D-coded M12 for 100 Mbit/s, or X-coded M12 for Gigabit links. Power to PROFINET I/O blocks is typically supplied over L-coded M12, which is keyed for DC power and includes a functional earth contact. Confirm both ports on the device datasheet before ordering.

Should I buy a single-ended or double-ended M12 cordset?

Buy a single-ended cordset when one end will be landed on terminals inside a control panel, since it has an M12 connector on one end and open wire leads on the other. Buy a double-ended cordset when both ends plug into M12 ports, such as a sensor connected to an I/O block or junction box. Double-ended cordsets also include M12 to M8 and M12 to RJ45 versions.

Can I make an M12 cable to a custom length?

Yes. Field wireable M12 connectors terminate onto your own cable with screw, push-in, or IDC contacts, so you can cut the run to the exact length you need. Match the connector's coding, pin count, and cable diameter range to the cable you plan to use. Molded cordsets remain the better choice where washdown, vibration, or sealing is critical.

Do I need a male or female M12 cordset for my sensor?

Choose the gender opposite to the device port. Most sensors and actuators have a male M12 port, so the cordset end that plugs into the device is female. I/O blocks and junction boxes usually have female ports, so the cordset end that plugs into them is male.

Need help matching an M12 cordset to your device?

Send us the device part number and the run length, and the Automation Distribution team will help you confirm coding, pin count, gender, and jacket. Contact Automation Distribution or call 1-888-600-3080.