
Table of contents
- Overview of M12 connector coding
- Colour coding for M12 connectors
- Standards and guidelines for M12 plug assignment
- Selecting the right M12 connector for specific applications
- Errors that should be avoided with the M12 connector assignment
- Conclusion: Important aspects of the M12 connector assignment
The M12 connector system is as versatile as the areas of application in which it has been used for many years. Reliable, robust and well protected against faulty connections - these are just some of the enormous advantages of M12 connector systems. It is understandable that they are almost indispensable in many areas of industry.
The connector systems can be used to transmit signals, data or power and are protected against dust and moisture. Depending on the area of application, they are available in numerous variants with different pin assignments.
This robustness and the high flexibility of the application make this type of connector system so popular. The following guide reveals more about the areas of application for M12 connectors, the M12 connector pinout and the coding, making it much easier to select and decide on the right connector variant.
What is an M12 connector pinout and why is it so important in the industry?
In order to understand the pinout of an M12 connector, general information about M12 connectors is important first. This type of connector system always consists of a round connector and the matching M12 socket. The plug is also referred to as the male part and the socket as the female part. "M12" is the designation for the thread size. Mismatched plugs and sockets cannot usually be joined together, which minimises the risk of errors when connecting.
With M12 connector systems, there are pre-assembled, i.e. already wired plugs and sockets with a fixed pinout, but also sockets and plugs that are only assembled on site. For this assembly, you should be familiar with the M12 connector pinout, coding and colour codes.
The term M12 connector pinout refers to the positioning of the pins (contact pins) on the connector. They are each connected with wires, with each pin of the plug fitting into a suitable opening in the socket. In addition to the assignment, there is also the coding, whereby the individual codes are labelled with letters.
Plugs with a certain coding (e.g. "A") only fit on sockets with the same coding, whereby the different codes include plugs with a different number of pins. The A code includes 3, 4 and 5-pin variants. This is referred to as an M12 connector 5-pole, a-coded, for example. The colour codes indicate the colours of the wires that are connected to the pins of the plugs and the openings of the sockets. They simplify the correct wiring of the connectors, e.g. with a PROFINET connector M12 pinout.
Application examples for M12 connector pinout
Each connector coding has its own focal points, which also require an individual pin assignment depending on the application. For example, M12 connectors with A or B coding are used to transmit signals. Those with D or X coding are used for data transfer, while connectors with L or S coding are used for power transmission. There is also a wide range of industries and tasks for which M12 connector systems are used:
- M12 connector systems can also be used to supply power to machines such as stepper motors, which perform revolutions in a number of steps of equal size
- M12 connector systems, for example in robotics, can connect sensors and actuators with each other
- In industrial data networks, they contribute to interference-free, fast data transmission for automated production
- In rail transport, they support systems for passenger information or video surveillance
These are just a few examples. Since their introduction in the 1980s, M12 connector systems have continued to develop and open up new areas of application.
M12 connector coding overview: The different variants of M12 connector coding
What pin assignment is available for the connector coding?
Not every M12 connector coding contains connectors with every possible number of pins in an M12 connector system.
Important: The pin ID of an M12 connector does not always correspond to an uninterrupted sequence of numbers starting at 1. For example, a 2-pin M12 connector, A-coded, has the pin IDs 1 and 3, but not 2.
The following list provides an overview of M12 connector coding.

M12 connector 12-pin A-coded
M12 connector A-coded
A small curvature is typical of an M12 connector with A-coding.
It ensures that the M12 A plug and the M12 A socket fit together. This
connector system is the oldest of the M12 connector family and primarily
connects sensor cables for sensors and actuators. Examples of products from the specialised trade:
- M12 connector 4-pole and a-coded
- M12 connector 8-pole and a-coded
- M12 connector 12-pole and a-coded
Pin assignment:
Most
variants of M12 connectors with A-coding are available with a different
M12 connector pinout and a different number of pins. There are not only
two-pin or three-pin variants, as there are also M12 connectors,
a-coded, 4-pin on the market. There is also the 5-pin plug variant, as
well as with six, eight, twelve or 17 pins, whereby the arrangement of
the pins inevitably changes.
Example: If the M12 is 5-pin and
A-coded, there are four pins as corners of a square and one in the
centre. Pin 1 is at the top right, pin 2 at the top left, pin 3 at the
bottom left and pin 4 at the bottom right. Pin 5 is in the centre.
Not
all 5-pin M12 connectors are structured as described above. The pin
assignment is different for a c-coded 5-pin M12 connector. The pins are
arranged in a circle at the edge and pin 1 is at the bottom right. It
continues via top right to bottom left. The pin at the top centre is
reserved for the protective conductor.
The more pins the
connector contains, the more complex the arrangement becomes. If you
take an M12 PROFIBUS connector with 12 pins, the assignment is such that
pin 1 is at the top right and pins 2 to 9 are distributed in a circle
to the left at the edge. Pins 10 to 12 are located as a triangle within
this circle. As the M12 connector is only available in 12-pin A-coded
form, this is the only 12-pin assignment.

M12 connector 5-pin B-coded
Connectors M12: B-coded
Regardless of whether the connector is straight or angled - a straight lock with a small curvature is characteristic of an M12 connector with B-coding.
This connector is used for data transmission in fieldbus systems that
connect sensors and actuators to each other and to control units.
Pin assignment:
The
b-coded M12 connector is only available with four or five poles. The
pin assignment is the same as for the a-coded plugs with four or five
poles.
M12 connectors 4-pin C-coded

M12 connectors 4-pin C-coded
Connectors M12: C-coded
The M12 connector with C-coding is rare in industrial environments. It is primarily used for power supply with 230 V voltage.
Pin assignment:
The
C-coded plugs are found with 3, 4, 5 or 6 pins, whereby the pin at the
top centre is always assigned to the protective conductor.

M12 connector 4-pin D-coded
M12 connector: D-coded
Two tongue and groove connections arranged at a 90-degree angle are characteristic of an M12 connector with D-coding.
It is used for data transmission in industrial applications and
supports data speeds of 100 Mbit/s. It can be used, for example, as a
PROFINET connector M12 pinout with four pins. Profinet is an industrial
Ethernet standard for automation technology.
Pin assignment:
This
M12 connector is 4-pin and the assignment is the same as for the
A-coded variant: square arrangement of the pins with pin 1 at the top
right.

M12 connector 5-pin K-coded
M12 connector: K-coded
The M12 connector with K-coding
is one of the connectors that transmit power. The rated voltage is 630
volts and the current is up to 12 amperes per contact. This connector
can be used to supply alternating current in the high-power range and
can transmit power of up to 10 kW.
Pin assignment:
This power connector is available in 2 to 5-pin variants.

M12 connector 5-pin L-coded
Connectors M12: L-coded
The M12 connectors with L-coding
can handle up to 16 amps per contact and have a rated voltage of 63
volts. They are also power-transmitting connectors and are used, for
example, for the power supply in Profinet systems. Profinet is a
communication standard used in automation.
Pin assignment:
This power connector is available in 2 to 5-pin variants.

M12 connectors 4-pin M-coded
Connectors M12: M-coded
This
plug is designed for up to 8 amps and 630 volts. It is used, for
example, for signal transmission with high transmission reliability.
Pin assignment:
This M12 connector is available in 2 to 6-pin variants.

M12 connector 4-pin S-coded
M12 connector: S-coded
The M12 connector with S-coding
transmits power. It is designed for a capacity of up to 630 volts and
12 amps of current and is suitable for supplying motors with alternating
current, for example.
Pin assignment:
This power connector is available in 2 to 4-pin versions

M12 connectors 4-pin T-coded
Connectors M12: T-coded
T-code
M12 connectors are designed for a rated voltage of 63 volts and a current of up to 12 amps per contact. They can supply DC motors with power.
Pin assignment:
These
power connectors are available in 2- to 4-pin versions. An example of
an M12 connector, 4-pin, with assignment according to T-coding is the
M12 power device connector with the manufacturer designation
7.999.101.47K from Hummel.

M12 connector 8-pin X-coded
M12 connectors M12: X-coded
The
x-coded connector system is used for data transmission and is therefore
similar to the d-coded variants. However, the potential transmission
rate of up to 10 Gbit/s is significantly higher.
Pin assignment:
The
X-coded M12 connector exists in an 8-pin variant, whereby it has a
different pin assignment to the A-coded 8-pin variant. There are also
products that couple an 8-pin M12 connector pinout with all pins
assigned to an RJ45 connector.
M12 connectors: Y-coded
The
Y-coded M12 connector is a hybrid connector. It transmits both data and
power and is therefore particularly suitable for compact devices in
which space-saving solutions are important. M12 connectors are also
available in the form of adapters that connect elements of different
connector systems. For example, there are adapters for M12 x-coded to
M12 d-coded connections. They are suitable for connecting gigabit
devices to slower Cat5 cabling. Adapters can also connect different
connector systems with each other. For example, to connect an M12
connector x-coded to an RJ45 jack.
Pin assignment:
The Y-coded M12 connector exists in an 8-pin variant, whereby it has a different pin assignment to the A-coded 8-pin variant. There are also products that couple an 8-pin M12 connector pinout wit
Colour coding for M12 connectors
A coding for M12 connectors also exists for cable colours, which are connected to the respective pins and openings of the plug and socket. However, the M12 connector pin assignment colours do not follow a standard, at least not a single one. However, standards do exist.
Pin ID | 2-pin | 3-pin | 4-pin | 5-pin | 6-pin | 8-pole | 12-pin | 17-pin |
---|---|---|---|---|---|---|---|---|
1 | Brown | Brown | Brown | Brown | Brown | White | Brown | Brown |
2 | White | White | White | Brown | Blue | Blue | ||
3 | Blue | Blue | Blue | Blue | Blue | Green | White | White |
4 | Black | Black | Black | Black | Yellow | Green | Green | |
5 | Grey | Grey | Pink | Pink | ||||
6 | Grey | Purple | Yellow | Yellow | ||||
7 | Red | Blue | Black | Black | ||||
8 | Red | Grey | Grey | |||||
9 | Red | Red | ||||||
10 | Violet | Violet | ||||||
11 | Orange | Orange | ||||||
12 | Light Green | Light Green | ||||||
13 | Light Blue | |||||||
14 | Black | |||||||
15 | Brown | |||||||
16 | Red | |||||||
17 | Blue |
Download table
Up to the M12 connector (12-pin assignment), a separate colour is used for each pin ID. Colour codes also exist for M12 connectors with different coding. Here are some examples in the following table:
Pin ID | B-coded 5-pin | D-coded 4-pin | X-coded 8-pin | Y-coded 8-pin | S-coded | T-coded | K-coded | L-coded | M-coded |
---|---|---|---|---|---|---|---|---|---|
1 | Brown | Yellow | White / Orange | White / Orange | Black 1 | Brown | Black 1 | Brown | Black 1 |
2 | White | White | Orange | Orange | Black 2 | White | Black 2 | White | Black 2 |
3 | Blue | Brown | White / Green | White / Green | Black 3 | Blue | Black 3 | Blue | Black 3 |
4 | Black | Blue | Green | Green | Black | Black 4 | Black | Black 4 | |
5 | Grey | White / Brown | Blue | Black 5 | |||||
6 | Brown | White | |||||||
7 | White / Blue | Brown | |||||||
8 | Blue | BK | |||||||
PE | Green / Yellow | Green / Yellow | Grey | Green / Yellow |
M12 connector pinout standards and guidelines
Is there a standard for M12 connector pinouts? No, because there are several:
- DIN EN 61076-2-101 exists for the A, B and D coding of M12 connectors
- The standards for the K, L, S and T coding of power connectors are described in IEC 61076-2-111
- DIN EN 61076-2-109 is responsible for the X-coding of fast data connections
- DIN EN 61076-2-113 is responsible for hybrid connectors with Y-coding


Selecting the right M12 connector for specific applications
When selecting M12 connectors, it is always important to consider whether signals or data are to be transmitted via the connector. Depending on the task, connector systems with different codings must be used. Power connectors are not suitable for a sensor cable.
Specific requirements in the various sectors should also be taken into account. For example, a high IP class (protection against dust and moisture) or a suitable temperature scale in which the connector system can be used can be important. An M12 connector, 12-pin, with A-code assignment is the 1404413 angled sensor connector from Phoenix Contact with IP67 protection class and a possible temperature range of -40°C to 85°C.
An M12 connector can also be straight or angled. Whether the connector is straight or not is particularly important for compact systems with installations in confined spaces. The M12 sensor connector with the number 99.0437.282.05 is an example of a straight connector with the following properties: M12, 5-pin, A-coded.
Model 1404411 from Phoenix Contact is also a straight connector with the following properties: M12, A-coded, assignment of 12 pins. The M12 connector pinout WS 3POL.METV is an example of an angled connector: an M12 connector, 3-pin, with an assignment that corresponds to A-coding.


Errors that should be avoided with the M12 connector pinout
You should always make sure that the correct wires are connected to each other via the plug and socket. The colour codes mentioned above can be very helpful here. It would also be a mistake with the M12 connector pinout to use a power connector designed for low voltage for a high-voltage system.
Instructions for pinout and connection of an M12 connector
If you decide to assemble the M12 connector pinout with wires yourself (assembly), you can proceed as follows:
- The sheathing elements of the connector are threaded onto the cables like beads on a string. If the plug has 4 poles, there are usually four conductors
- The sheathing of the cables is removed over a length of about four centimetres
- The sheathing of the individual conductors is then removed over a length of about one centimetre
- The pins of the connector can be connected to the individual conductors by crimping, for example
- The conductors with pins are then connected to the plug and finally the coloured tube, which is pulled over the wire as a colour code, is attached.
Conclusion: Important aspects of M12 connector pinout
Whether M12 connector, 8-pin and A-coded, M12 A-coded, 12-pin, M12 connector, 8-pin, with assignment of all pins, etc.: The various terms and the pin assignment for M12 connectors can be confusing at first. However, if you familiarise yourself a little with the coding of M12 connectors, things quickly become clearer.
There are now more than just threaded M12 connectors. There are also variants with push-pull quick connectors for simplified installation. There are also hybrid connectors that can transmit data, signals and power at the same time. This suggests that the triumphant advance of M12 connectors with their pinout is far from over.
Despite careful editing and checking of the content, Stecker Express assumes no liability for the topicality, correctness, completeness and quality of the information provided.
Further advice topics
Cable colours
Cable / power cable colours - What do the different colours of power cables or cables in general mean?
Cable jacket
Cable sheathing & cable insulation - properties and differences of the cable sheath at a glance
Cable designation
Cable designation illuminated: This makes it easy to identify cables
AWG in mm²
Conversion of AWG cable cross-sections to mm² - Strand construction and AWG tables
Cable protection
Cable protection - 11 ways to protect cables and wires efficiently