Skip to content
MtrXTools

Hex converter

Convert bytes between hex, text (UTF-8), binary, decimal and base64, accepting hex with spaces, colons, 0x or \x prefixes, and view a hex dump with offsets. Runs in your browser.

What it does

  • Reads hex in any common form: 48656c6c6f, 48 65 6c, 48:65:6c, 0x48, 0x65 C arrays, \x48\x65 escapes, %48%65 and od or tcpdump output with line breaks.
  • Also reads text (as UTF-8), binary in 8-bit groups, decimal byte values (0-255) and base64, and detects which one you pasted.
  • Shows the bytes in every format at once, each with a copy button: hex in five styles (with an uppercase option), text, binary, decimal and base64.
  • Shows a hex dump with offsets and an ASCII column, and for up to 8 bytes the value as an unsigned and signed integer in big-endian and little-endian order.
  • Points to the problem in bad input: the position of a character that isn't a hex digit, or the group with an odd number of digits.

Text, bytes and encodings

Hex shows bytes, not characters. ASCII letters take one byte each, but accented letters, other alphabets and emoji take two to four bytes in UTF-8, so é is c3 a9 and an emoji is four bytes. When bytes are not valid UTF-8 (often because they are Latin-1 text or binary data), the converter shows them as Latin-1 and gives the offset of the first byte that broke UTF-8.

Byte order matters for numbers: the bytes 01 00 are 256 read big-endian (network order) but 1 read little-endian (how x86 and ARM store integers in memory).

Questions

Why does my hex give an "odd number of digits" error?
Each byte is two hex digits, so a missing or extra digit leaves one without a partner. The error names the position or group. A single digit written with a prefix, like 0x5, is read as 05.
How is "10 20 30" read?
Auto mode reads it as hex, since it is valid hex. If you meant decimal byte values, pick Decimal bytes. A list with a three-digit number, like 72 101 108, is recognised as decimal automatically.
What is the difference between signed and unsigned?
Unsigned reads all bits as a positive number. Signed uses two's complement, where a top bit of 1 means negative, so ff is 255 unsigned and -1 signed.
Is my data uploaded?
No. All conversion runs in your browser.