Hex Encoder / Decoder

Convert text to hexadecimal or decode hex back to text. Everything runs in your browser — nothing is uploaded.

Encode (Text → Hex)
Decode (Hex → Text)
0 characters

FAQ

Binary Protocols File Analysis Network Packets Magic Numbers
How do hex, binary, and decimal convert to each other?
Hexadecimal has a base of 16, each digit representing 4 binary bits. The tool converts between all three instantly—no manual calculation.
How do I view a file in hexadecimal?
Upload any file and it displays the hex content automatically. Supports paginated viewing of large files. Great for checking file headers (Magic Numbers).
Why do some characters look strange in the sidebar?
The ASCII sidebar shows non-printable characters (spaces, control codes) as symbols. This is normal—it's just how hex viewers display them.
What can I do with a hex editor?
You can directly modify file hex content—repair corrupted headers, patch strings in programs. Use with caution and always back up first.
How do strings and hex convert to each other?
Type a string and the hex representation appears instantly. Paste hex and it converts back. Essential for protocol debugging.

When Hex Encoding Is Useful

Hexadecimal is a compact way to represent bytes using readable text. Each byte becomes two hex characters, so 48 65 6c 6c 6f represents the UTF-8 bytes for Hello. Developers use hex when inspecting binary protocols, file signatures, cryptographic digests, encoded payloads, and byte-level differences that are hard to see as plain text.

Hex is not compression and not encryption. It is simply a byte display format. It is useful because it makes invisible or non-printable data visible: null bytes, control characters, byte order marks, separators, and file headers can all be inspected without guessing what the original text editor is showing.

Common Hex Decode Problems

Odd number of characters
A byte needs two hex digits. 48656c6c6f decodes cleanly, but 48656c6c6 is missing half a byte.
Non-hex characters
Valid hex only uses 0-9 and a-f. Spaces are fine because this tool removes whitespace, but characters such as g, x, or punctuation are not part of hex data.
Encoding mismatch
The same bytes can decode differently depending on the text encoding. This tool uses UTF-8, which is the standard for modern web content and APIs.

Example: Text to Hex

Text: Hello API
Hex:  48 65 6c 6c 6f 20 41 50 49