The Short Answer
Both connectors screw together and seal to IP67 or better when mated. The difference is size and capacity: M8 saves space on small sensors, while M12 has room for more pins, higher currents and the twisted pairs Ethernet needs.
-
//
Thread M8: 8 mm. M12: 12 mm.
-
//
Pins M8: 3, 4, 6 or 8. M12: 3 to 12.
-
//
Power M8 is for low currents; M12 has dedicated power codings.
-
//
Ethernet M8 is used for some compact 100 Mbps links; M12 D and X coding cover 100 Mbps to 10 Gbit/s.
-
//
Typical use M8: small sensors. M12: sensors, actuators, Ethernet, power and computers.
Which to Use
Use M8 where space on a sensor or small actuator is the constraint. Use M12 for everything that carries real power or network data, including the I/O on rugged and waterproof computers. Our guide to M12 connectors covers coding, pinouts and sizes.