Modbus Address Converter
Type an address from a manual or software and see the same register in every notation: register number, 0-based address, hex and the bytes in the frame.
Address
ExampleFor example 40001, 400001, 4x0001, 30010, 0x006B or a plain address like 107.
The same register in every notation
| Type | |
|---|---|
| Address in the request (0-based) | |
| The same in hex | |
| Address bytes in the frame | |
| Register number, 5 digits | |
| Register number, 6 digits | |
| Number counted from 1 |
Read request for this address
The bytes a master sends to read from here. Compare them with a serial log or Wireshark.
- Modbus RTU (CRC low byte first)
- Modbus TCP (transaction 1)
Runs entirely in your browser. Nothing you enter is sent to a server.
Register types at a glance
| Type | Register numbers | Read | Write | Size |
|---|---|---|---|---|
| Coils (0x) | 00001–09999 · 000001–065536 | 01 | 05, 15 | 1 bit |
| Discrete inputs (1x) | 10001–19999 · 100001–165536 | 02 | read-only | 1 bit |
| Input registers (3x) | 30001–39999 · 300001–365536 | 04 | read-only | 16 bits |
| Holding registers (4x) | 40001–49999 · 400001–465536 | 03 | 06, 16 | 16 bits |
Register number or address?
Manuals usually list registers by register number: 40001, 30001, 10001 or 00001. The first digit names the table and counting starts at 1. The request on the wire carries something else: a 0-based address from 0 to 65535, without any table digit. The table is chosen by the function code instead, 03 for holding registers and 04 for input registers. That is why 40001 becomes address 0 and 30010 becomes address 9 with function 04.
Six-digit numbers such as 400001 work the same way. They exist because five digits only reach 9999 registers per table, while the protocol allows 65536. Notations like 4x0001 or 4x00001 are just another way to write 40001.
Common mistakes
- Off by one. Entering 40001 minus 40000 = 1 instead of 0 reads the next register. Every value then looks shifted, or a 32-bit float turns into nonsense.
- Hex read as decimal. Manuals that write 0x0100 mean address 256, not 100. If the address has letters A to F or a 0x prefix, it is hex.
- Wrong table. 30001 and 40001 are different registers. Reading an input register with function 03 returns a different value or exception 02, illegal data address.
- Software that already subtracts 1. Some programs ask for register numbers counted from 1 and subtract 1 for you. If your tool has a “base 0 / base 1” or “PLC address” setting, check which one it uses before you subtract anything yourself.
Questions from practice
Is 40001 address 0 or address 1?
Address 0. 40001 is the first holding register in classic Modicon numbering, which counts from 1. The request carries the 0-based address, so 40001 is sent as 00 00 and 40002 as 00 01.
What is the difference between 40001 and 400001?
None, they are the same register. Five-digit numbers can only reach 49999, which is address 9998. Six-digit numbers (400001 to 465536) cover the full range of 65536 addresses, so some manuals use them for every register.
My manual lists 0x006B. What do I enter in my software?
0x006B is a hex address: 107 in decimal. If your software asks for a 0-based address, enter 107. If it wants a register number, enter 40108 for a holding register or 30108 for an input register.
Which function code reads 3xxxx and 4xxxx registers?
Input registers (3xxxx) are read with function 04. Holding registers (4xxxx) are read with function 03 and written with 06 for one register or 16 for several. Coils (0xxxx) use 01, 05 and 15; discrete inputs (1xxxx) use 02.
Why do I get exception 02, illegal data address?
The device has no register at the requested address. Typical causes are an address off by one, a hex address entered as decimal, reading an input register with function 03 or the reverse, or reading more registers than the block contains.
Related tools
- Register DecoderFloat32, Int32, UInt16 and bits in every byte order, plus Find my value.
- Value EncoderTurn a value like 230.5 into registers for every byte order.
- CRC-16 CalculatorModbus RTU checksum in wire order, plus a full frame check.