Free Online Hex Encoder & Decoder
Convert text to hexadecimal and back. Supports ASCII and UTF-8 encoding with configurable output formats and real-time mode.
text_fields Input
code Hex Output
Input: 0 chars | 0 bytes
Output: 0 hex digits | 0 bytes
| Character | Hex Value |
|---|---|
| Enter text and click Encode to see mapping | |
Key Features
Instant Processing
All operations run locally in your browser for instant, zero-latency results.
Privacy Protected
Your data never leaves your browser. No server storage or tracking.
Frequently Asked Questions
Basics
How does hex encoding differ from Base64 encoding?
Hex encoding expands each byte to exactly two characters, producing output that is twice the size of the original binary data. Base64 encodes 3 bytes into 4 characters, resulting in only about 33% size increase. Use hex when you need to inspect individual bytes; use Base64 when you need to minimize payload size.
Is the hex output affected by the input encoding (ASCII vs UTF-8)?
Yes, this tool encodes the raw bytes of the input text converted to UTF-8. An ASCII character like "A" produces one byte (0x41). A multi-byte character like the Euro sign produces three bytes in UTF-8 (0xE2 0x82 0xAC).
Usage Tips
When should I use the 0x prefix format vs. space-separated?
Use the 0x prefix format when pasting into C/C++, Rust, or Go source code. Use space-separated for interoperability with command-line tools like xxd. Use no-separator compact format when embedding hex in JSON or when the consumer expects a single contiguous string.
Why does my decoded hex string show garbage characters?
This usually happens when the hex string contains an odd number of nibbles, invalid hex characters, or byte sequences that do not form valid UTF-8 code points. Also check that the original data was UTF-8 text — binary data will produce unprintable characters.