onlinetools.dev

Text ↔ Hex / Binary Converter

Turn text into hex, binary or decimal bytes and decode byte dumps back

Runs locally
loading…
About this tool

See exactly which bytes your text is made of: this tool encodes text to UTF-8 and shows it as hex, binary or decimal byte values — with your choice of separator, casing and 0x prefixes. The decoder goes the other way and is deliberately tolerant: it accepts continuous runs (48656c6c6f), spaced pairs, colon-separated MAC-style notation and \x escape sequences.

Because encoding is byte-level UTF-8, multibyte characters are shown as they actually exist in memory and on the wire: é is c3 a9, 世 is e4 b8 96, and emoji take four bytes. That makes this the quickest way to debug encoding mismatches, BOM mysteries and "why is this string longer than it looks" problems.

If decoded bytes are not valid UTF-8, the tool says so instead of printing mojibake — a strong hint you are looking at binary data rather than text.

Frequently asked questions

Why does one character become several bytes?
UTF-8 is variable-width: ASCII stays one byte, most European letters take two, CJK three, emoji four. What you see here is the exact byte sequence any UTF-8 system — files, HTTP, databases — stores for your text.
What input formats does the decoder accept?
Hex as a continuous run, spaced pairs, with 0x or \x prefixes, or colon/comma-separated; binary as 8-bit groups with or without spaces; decimal as separated byte values. Mixed separators and stray whitespace are cleaned up automatically.
Why does decoding say the bytes are not valid UTF-8?
The byte sequence violates UTF-8 rules — for example a lone ff, or a continuation byte with no lead byte. The data may be binary, in a legacy encoding like Latin-1, or truncated mid-character.
Is this the same as a hex dump from xxd?
The byte values are identical; xxd adds offsets and an ASCII column. Paste the hex columns of an xxd dump here (without the offset column) and it decodes fine.
Related tools