Modbus register to float converter
Enter two registers read from the device. The table shows the result for every byte order, so you can see straight away which one makes sense.
Result
- Int32
- 1,095,300,547
- UInt32
- 1,095,300,547
- Int16 / UInt16 (R1)
- 16,712 / 16,712
- Int16 / UInt16 (R2)
- −2,621 / 62,915
- Hex
- 4148 F5C3
| Order | Float32 | Int32 | UInt32 |
|---|---|---|---|
| ABCD | 12.56 | 1,095,300,547 | 1,095,300,547 |
| CDAB | −4.950302 × 10³² | −171,753,144 | 4,123,214,152 |
| BADC | 198,415.8 | 1,212,269,557 | 1,212,269,557 |
| DCBA | −490.5645 | −1,007,335,359 | 3,287,631,937 |
Why byte order matters
Modbus carries data in 16-bit registers, while a float32 takes 32 bits, so two registers. The standard doesn’t say which register holds the high half, so manufacturers differ. The same registers 4148 F5C3 are 12.56 in ABCD order but a completely different number in CDAB.
If you don’t know the device’s order, read a known value (such as a temperature shown on its display) and find the table row where the result matches.
How an IEEE 754 float is built
A float32 has a sign bit, 8 exponent bits and 23 mantissa bits. That gives a range of about ±3.4 × 10³⁸ and roughly 7 significant digits.
Common questions
What does CDAB mean?
A word swap: the device sends the low register first, then the high one. It is one of the most common orders in PLCs and energy meters.
Why do I get a huge or tiny number?
Almost always the wrong byte order. Check the other rows of the table.
Does the tool connect to my device?
No. It only converts the values you type, in your browser.