Ordering an M8 4-pin connector by pin count alone can easily lead to the wrong part. The connector may not mate, the sensor may power up without a signal, or an Ethernet link may become unstable because the coding, pinout, gender, shielding, or termination does not match.
This guide helps maintenance technicians, panel builders, and purchasing teams quickly identify the right M8 4-pin connector for sensors, actuators, I/O modules, or 100 Mbit/s industrial Ethernet. Use it for selection and RFQ preparation, then confirm the final details with the device or connector datasheet.
Quick decision:
- Sensor or actuator wiring → choose an A-coded M8 4-pin connector.
- 100 Mbit/s industrial Ethernet → choose a D-coded M8 4-pin connector.
- Unknown replacement part → check the keying, face view, pinout, cable label, and device datasheet before ordering.
| Soulin’s waterproof circular connector range includes M5, M8 and M12 options, including M8 4-pin waterproof assemblies and D-coded M8 models for industrial network applications. IP67/IP68 protection, anti-vibration locking, shielding, molded or potted structures, and certification documents should be confirmed by the selected product datasheet or RFQ. |
| Not sure whether you need an A-code or a D-code? Send us your device model or a photo of the existing connector, and we will help match it.→ Send Your Pinout / RFQ |
What Is an M8 4-Pin Connector?
An M8 4-pin connector is a compact circular connector with an M8 threaded coupling and four electrical contacts. It is widely used in industrial automation where small sensors, actuators, compact I/O modules, robotics, or machine tools need a secure and space-saving connection.
The “M8” refers to the metric coupling size, while “4-pin” refers to the number of electrical contacts. A complete specification should also include coding, gender, orientation, termination method, cable size, shielding, and environmental rating.
Common configurations include male or female, straight or right-angle, field-wireable or factory-molded, shielded or unshielded, and IP67/IP68-rated versions for dusty or wet industrial environments. Because of this range, “M8 4-pin” describes a family of parts rather than a single one.
Standards and Scope
M8 connector standards help define mechanical interfaces, coding, and performance expectations, but they do not remove the need to check the exact product datasheet. For this topic, the most relevant references are:
- IEC 61076-2-104: commonly associated with M8 circular connectors, including A-coded versions used in sensor and actuator applications.
- IEC 61076-2-114: commonly associated with M8 D-coded interfaces used for industrial Ethernet.
- IEC 60529: defines IP ratings such as IP67 and IP68 (published by the International Electrotechnical Commission).
In practice, the final current rating, voltage rating, temperature range, cable diameter, termination method, and sealing performance must be confirmed from the specific connector or cable assembly datasheet.
Why “4-Pin” Is Not Enough: A-Code vs D-Code
The most common mistake is ordering by “M8 4-pin” without checking the coding. Coding refers to the mechanical keying on the connector face, which helps prevent different connector types from being mated incorrectly. According to HARTING’s circular connector coding reference, A-coding is commonly used for sensor and actuator applications, while D-coding is used for Ethernet data transmission up to 100 Mbit/s.
So even if two connectors are both M8 4-pin, an A-coded version and a D-coded version have different keying, pin functions, and intended applications. The table below summarizes the main differences before you choose a new cable assembly.
| Item | A-Coded M8 4-Pin | D-Coded M8 4-Pin |
| Main use | Sensor, actuator, I/O power and signal | Industrial Ethernet data |
| Typical application | Proximity sensors, switches, compact I/O | PROFINET, EtherCAT, EtherNet/IP |
| Typical signal type | L+, L−, signal output, auxiliary | Two differential data pairs |
| Can they replace each other? | No | |
Please check the coding mark, keyway, gender, pin numbering, cable label, and device datasheet before substitution. Soulin offers M8 4-pin waterproof assemblies and a dedicated M8 4P D-code anti-vibration waterproof connector for 100 Mbit/s Ethernet links. For A-coded sensor/actuator wiring, confirm the exact M8 configuration by RFQ or datasheet.
M8 4-Pin Pinout at a Glance

Use the assignments below as a first check when identifying a connector, then verify the final wiring against the device or cable assembly datasheet.
A-Coded Sensor/Actuator Pinout

| Pin | Common A-coded color | Typical A-coded function |
| Pin 1 | Brown (BN) | L+ / supply positive |
| Pin 2 | White (WH) | Signal, second output, or auxiliary |
| Pin 3 | Blue (BU) | L− / 0 V |
| Pin 4 | Black (BK) | Primary signal output |
The BN/WH/BU/BK color code is common for many industrial sensor cables, but functions can still vary by sensor, actuator, or cable assembly. Reference documentation, such as SICK’s M8 and M12 connectivity guide (PDF) lists pin-to-color assignments per part number. Always confirm before wiring.
D-Coded Ethernet Pinout

A D-coded M8 4-pin connector carries two differential data pairs. Vendor drawings commonly label the contacts as follows:
| Pin | Common D-coded label | Function |
| Pin 1 | TD+ | Transmit data positive |
| Pin 2 | RD+ | Receive data positive |
| Pin 3 | TD− | Transmit data negative |
| Pin 4 | RD− | Receive data negative |
When the cable adapts to RJ45, only four of the eight RJ45 positions are used. The final M8-to-RJ45 mapping should be confirmed from the cable assembly drawing to preserve pair integrity. For Ethernet use, shielding, pair twist, cable category, and termination quality all affect link stability.
| Need the exact pin layout? Request the M8 4-pin pinout drawing and datasheet for the coding you need.→ Request M8 Connector Datasheet |
Male vs Female Face View

Male and female M8 connectors are read from different face views. When the two sides mate, their pin positions are mirrored, so the pin numbers you see on a male face view should not be copied directly to the female face view.
Before wiring or checking continuity, identify whether the drawing shows the male side or the female side, then follow that exact face-view diagram. This helps avoid reversed pin numbering during field wiring or replacement.
Electrical and Mechanical Specifications
M8 4-pin ratings vary by connector type, cable assembly, material, and manufacturer. The values below are common examples seen in industrial M8 product families:
- Rated current: many 4-pin M8 power/signal models are around 4 A, depending on the connector design and operating conditions.
- Rated voltage: common models may range from ≤30 V to 60 V depending on the series.
- IP rating: IP67 or IP68 is common, but only applies when the connector is correctly mated and sealed.
- Temperature range: many industrial versions support around −25 °C to +85 °C, while extended models may reach +105 °C.
- Termination: screw, solder, IDC, crimp, or molded cable options may be available depending on the series.
IP67 and IP68 ratings apply under the conditions defined by the product datasheet. Actual sealing performance depends on the connector design, cable jacket compatibility, O-ring condition, and correct mating. If you need help choosing a sealing class, see this IP67 vs IP68 vs IP69K waterproof connector guide.
Why Choose Soulin M8 Connectors for Industrial Wiring?

At Soulin, we manufacture waterproof circular connectors for industrial automation, including M8 connector assemblies for sensor wiring, industrial networks, machine tools, and control systems. For M8 4-pin selection, our key advantages include:
- M8 4-pin waterproof connector assemblies and D-coded M8 options for industrial network applications.
- IP67/IP68 options depending on the selected model.
- Anti-vibration locking and secure mating structures on selected M8 models.
- Moisture, dust, and oil resistance for harsh industrial environments.
- PA66+GF housing, gold-plated contacts, sealing O-rings, and high/low temperature resistance on selected models.
- Molded, potted, cable-end, and panel-mount structures depending on the selected model.
- OEM/ODM customization, custom wiring requirements, free sample support, and RFQ-based configuration review.
- UL, IATF 16949, ISO 9001, and RoHS-related documentation should be confirmed by the selected product datasheet or RFQ.
If you need A-coded sensor/actuator wiring, a D-coded industrial network connector, or a special cable/termination requirement, send us your device interface, pinout, operating environment, and cable length. Our team can confirm the suitable M8 configuration by datasheet or RFQ review.
| PRODUCT HIGHLIGHTSoulin M8 Waterproof Connector SeriesIP67/IP68 options depending on the selected modelM8 4-pin assemblies and D-code modelsMolded, potted, cable-end, and panel-mount structures by modelCustom cable length and shielding via RFQ→ View M8 Series → Request Free Sample |
Three Common Selection Scenarios
Replacing a Sensor Cable
When replacing a sensor cable, match the connector already installed on the machine first: coding, gender, orientation, and face view. Then verify the pinout, wire color, cable length, and IP rating against the sensor or I/O module documentation.
Ordering a New Cable Assembly
A new cable assembly should start with a clear specification. List the coding, gender, cable length, shielding, wire gauge, jacket material, termination style, and operating environment before requesting a quotation. A ready-built option such as the M8 4-pin waterproof cable-end connector set can shorten this process.
Choosing for Industrial Ethernet
Industrial Ethernet applications usually require a D-coded M8 4-pin connector. The next checks are cable category, shield continuity, pair mapping, and network requirements such as PROFINET, EtherCAT, or EtherNet/IP. For coding background across the M-series, see this M12 connector coding guide.
Application Scenarios
- Robot joint cabling: confirm vibration, bend radius, and movement requirements by RFQ.
- Machine tool wiring: check oil, moisture, dust, and temperature exposure before selection.
- Production-line sensor and I/O wiring: match coding, gender, pinout, cable length, and IP rating before replacement.
How to Choose the Right M8 4-Pin Connector
Before requesting a quote or replacing an installed connector, lock down the following specification. This prevents most installation delays and wrong-part substitutions.
- Coding: A-coded for sensor/actuator I/O; D-coded for 100 Mbit/s Ethernet.
- Gender: male plug or female socket, matched to the device interface.
- Orientation: straight for open access, right-angle where cable clearance is limited.
- Termination: molded cable for sealed repeatability; field-wireable screw, solder, IDC, or crimp for on-site assembly.
- Shielding: shielded for industrial Ethernet, high-noise zones, drives, motors, or long cable runs.
- IP rating: match the connector to dust, washdown, oil, coolant, and outdoor exposure.
- Cable OD and wire gauge: confirm clamp range, conductor cross-section, current rating, and bending requirements.
Before you order: confirm the coding, check the correct face view, verify the datasheet, and make sure the connector is suitable for the actual environment. To match a complete configuration across M5, M8, and M12, review the Soulin waterproof circular connector range.
| Get the Soulin Product Catalogue or M8/M12 Selection Checklist.Compare coding, gender, pinout, shielding, IP rating, cable structure, and termination requirements before RFQ.→ Get Catalogue / Request Checklist |
M8 4-Pin vs M12 4-Pin

M8 4-pin connectors are used when space is limited, such as on small sensors, compact I/O blocks, and tight machine layouts. M12 4-pin connectors are larger and are often selected for stronger mechanical interfaces, larger cable sizes, or higher electrical requirements.
| Item | M8 4-Pin | M12 4-Pin |
| Size | Compact | Larger and stronger |
| Best for | Sensors, compact I/O, tight spaces | Heavier-duty wiring, larger cables |
| Installation space | Limited space | More cable clearance |
| Ethernet use | D-coded 100 Mbit/s options | More data/power coding options |
| Mechanical strength | Adequate for light, compact loads | Higher; better for vibration and larger cables |
| Selection tip | Choose when space matters | Choose when strength or cable size matters |
Copyable RFQ Template
You can copy the following format when sending an inquiry to a connector supplier:
- Required connector: M8 / 4-pin / A-coded or D-coded / male or female / straight or right-angle / shielded or unshielded / molded or field-wireable / IP67 or IP68 / rated voltage / rated current / cable OD / wire gauge / cable length / operating temperature / application environment.
- Application: sensor wiring, actuator wiring, I/O module, industrial Ethernet, machine tool, robotics, outdoor equipment, or another specific use case.
- Special requirement: oil resistance, coolant resistance, high-flex cable, custom length, panel-mount interface, anti-misinsertion design, or specific certification request.
For application-level use cases and configuration help, review Soulin’s industrial automation connector solutions. Typical fits include compact sealed sensor connections, automation line I/O, D-coded M8 links for EtherCAT/PROFINET, and robot joint cabling where space, vibration, and repeated movement matter.
| Request a Free M8 Connector Sample Share your basic requirements, and our team will recommend a suitable sample. Name: Email: Company: Application: Coding requirement: Cable length: Message: Submit Sample Request |



