Hex Encoder / Decoder
Turn text into hexadecimal bytes — or decode hex back into readable text — in one tool, both directions.
● 🔒 Your data is processed locally in your browser with the Web Crypto API and is never uploaded to our servers.
How to encode or decode hex
- Choose the direction: Text → hex or Hex → text.
- For encoding, choose the separator — space (
48 65), none, colon,0xprefix or\xescapes — and the letter case. - Paste your input and click Convert. Click Use output as input to reverse the result and check it.
When decoding, spaces, colons, commas, 0x and \x prefixes are ignored, so you can paste hex copied from a debugger, a log, a packet capture or source code as it is.
Examples
| Text | Hex (UTF-8) |
|---|---|
| Hi | 48 69 |
| Hello, World! | 48 65 6C 6C 6F 2C 20 57 6F 72 6C 64 21 |
| é | C3 A9 (2 bytes) |
| € | E2 82 AC (3 bytes) |
| 👍 | F0 9F 91 8D (4 bytes) |
Basic English characters take one byte, so their hex codes match the ASCII table: A = 41, a = 61, 0 = 30, space = 20.
Decoding problems and fixes
- Odd number of digits — each byte is exactly two hex digits; a digit is missing or extra.
- Strange characters like é instead of é — the bytes were encoded in another character set (often Windows-1252 or Latin-1), not UTF-8.
- Unreadable output — the hex may be binary data (an image, a hash, an encrypted message), not text. A SHA-256 hash, for example, is 64 hex digits that don't decode to anything readable.
Hex is not encryption
Hex encoding only changes how bytes are written; anyone can decode it in a second. To protect data, encrypt it — for example with AES Encrypt — and use hex or Base64 only to carry the encrypted bytes.
FAQ
Hex or Base64: which one should I use?
Hex is easy to read and compare byte by byte but doubles the size. Base64 is about a third shorter. See the Base64 Encoder / Decoder.
How do I convert numbers to hex?
Use the Hex Converter for decimal ↔ hex, or the Hex ↔ Binary Converter.
How do I see the hex of a whole file?
Open it in the Binary File Viewer.
Is my data uploaded?
No. Everything is converted in your browser.