M8 Connector Wiring Guide

M8 3-pin and 4-pin sensor connectors: pinout, wire colors, in 3D

🔒 Your data stays in your browser: nothing you type or upload is sent to a server.

How it works

Pick the 3-pin or 4-pin variant and follow the steps to wire an M8 sensor connector, with each pin highlighted in 3D. On the 3-pin, pin 1 is brown (+24 V), pin 3 is blue (0 V) and pin 4 is black (signal). The 4-pin adds pin 2, white, whose function depends on the device. D-coded M8 for Ethernet is not covered.

Common questions

What is the pinout of an M8 3-pin sensor connector?

Pin 1 is brown, +24 V, pin 3 is blue, 0 V, and pin 4 is black, the signal output. The 3-pin connector has no pin 2.

What colour is pin 2 on a 4-pin M8?

White. The 4-pin M8 is brown on pin 1, white on pin 2, blue on pin 3 and black on pin 4. What the white wire does depends on the sensor, so check its datasheet.

Can I use an M8 sensor cable for Ethernet?

No. Industrial Ethernet uses a D-coded M8, which is a different connector with a different key and wiring. This guide covers only the A-coded sensor connectors.

Related tools