Antpact Toolbox
中文
Home › Modbus Tools › Data Type Converter

Data Type Converter

Convert hex payloads to numbers across 8 data types and 4 byte orders, live.

Privacy: this tool runs entirely in your browser — files are never uploaded, and data is gone when you close the page.

How to use

  1. Paste a hex payload on the left (spaces or 0x prefixes are fine).
  2. Pick a byte order: ABCD / DCBA / BADC / CDAB.
  3. Read every integer and float interpretation on the right.
  4. Switch to Encode to go the other way, from a value back to hex.

FAQ

How do the four byte orders differ?

ABCD is big-endian (high byte first), DCBA is little-endian (low byte first), and BADC / CDAB are the two byte-swapped variants. Vendors differ — try each until the value makes sense.

Why does a type say "needs ≥4 bytes"?

Each type has a fixed width. FLOAT32 needs 4 bytes, so 2 bytes of input cannot be decoded.

Is encode mode the reverse of decode?

They are inverse directions of the same reordering: decode reorders then reads, encode reorders then emits, so the same byte order setting round-trips consistently.

About this Data Type Converter

Mismatched byte order is the classic field problem: the same bytes read in a different order give wildly different values. This tool decodes one input into eight data types at once, so switching byte order and comparing is instant. Values are right-aligned; types that need 2/4/8 bytes say so when data is short. Everything is computed locally in your browser.