Hex Converter
Convert text to hexadecimal and hex back to text, UTF-8 safe. Runs entirely in your browser. Nothing is sent to any server.
What is hex encoding?
Hexadecimal encoding writes each byte as two characters from 0-9 and a-f, so any data can be represented in plain, printable text. This tool encodes in both directions: it turns text into the hex of its UTF-8 bytes, and turns hex back into readable text. Because it works on bytes rather than characters, a single accented letter or emoji becomes several hex pairs: 'é' is c3 a9 and '🦩' is f0 9f a6 a9. Everything runs locally in your browser, so nothing you paste is ever transmitted.
Examples
The same conversion in the languages you're most likely to reach for:
const hex = [...new TextEncoder().encode(str)]
.map((b) => b.toString(16).padStart(2, "0"))
.join("");str.encode("utf-8").hex()
bytes.fromhex(hex).decode("utf-8")HexFormat.of().formatHex(str.getBytes(StandardCharsets.UTF_8))import "encoding/hex"
hex.EncodeToString([]byte(s))bin2hex($str);
hex2bin($hex);printf "%s" "$str" | xxd -p
echo "$hex" | xxd -r -pUse Cases
Reading a hex dump
Paste bytes copied out of xxd, hexdump, Wireshark or a debugger and get the readable string back, without wiring up a script just to decode one line.
Checking what a string really contains
Invisible characters are the usual suspect when two strings look identical but don't compare equal. Encoding to hex exposes them: a non-breaking space (c2 a0), a zero-width space (e2 80 8b) or a trailing carriage return (0d) all become visible.
Building fixture data for tests
Produce the exact byte sequence a parser, protocol or binary format test expects, with the separator style that matches the language you're writing the fixture in.
Verifying an encoding assumption
If text arrives mangled from a database or an API, the hex tells you whether you're looking at UTF-8 read as Latin-1, double-encoded UTF-8, or genuinely corrupt bytes.