HEX / Base16 Encoder & Decoder
Convert UTF-8 text to hexadecimal (Base16) bytes and decode hex strings back to text. 100% client-side, fast, private, and secure.
Hexadecimal (HEX or Base16) is a positional numeral system with a radix of 16. It uses sixteen distinct symbols: 0–9 and A–F (or a–f). Each hexadecimal digit represents four bits (1 nibble), and two hexadecimal digits represent one 8-bit byte (0x00 to 0xFF).
HEX Byte Mapping Reference
| Character / Symbol | Hex Byte (0x) | Decimal Value | Binary Byte (8-bit) |
|---|---|---|---|
| ASCII 'A' | 41 | 65 | 01000001 |
| ASCII 'Hello' | 48 65 6c 6c 6f | 72, 101, 108, 108, 111 | 5 Bytes |
| UTF-8 Accent 'é' | c3 a9 | 195, 169 | 2 Multibyte Bytes |
| CJK '你' | e4 bd a0 | 228, 189, 160 | 3 Multibyte Bytes |
HEX (Base16) vs Base64 Comparison
| Feature / Metric | HEX / Base16 | Base64 |
|---|---|---|
| Alphabet Size | 16 chars (0-9, a-f) | 64 chars (A-Z, a-z, 0-9, +, /) |
| Storage Efficiency | 2 chars per byte (100% expansion) | 4 chars per 3 bytes (~33% expansion) |
| Use Cases | Hashes, Crypto Keys, Memory Dumps, Microcontrollers | Email Attachments, Web APIs, Data URLs, JWTs |
What Is Hexadecimal Encoding?
Hexadecimal (base16) represents each byte of data as two hex digits (00–FF), giving a compact, human-readable way to inspect raw bytes — common in networking, low-level debugging, and binary file formats.
How to Use the HEX Encoder / Decoder
- Paste text to convert it to hexadecimal, or paste a hex string to decode it back to text.
- Choose Encode or Decode.
- Review the byte count and result.
- Copy the output.
Technical Notes
- Each byte becomes exactly two hex characters, so a hex string's length is always even.
- Text is encoded as UTF-8 bytes first, so multi-byte characters (accents, emoji, non-Latin scripts) produce more than two hex digits per visible character.
- Hex is a representation, not a cipher — it carries no security on its own.
Example
Frequently Asked Questions
Is HEX encoding uppercase or lowercase?+
Standard hexadecimal output in this tool uses lowercase letters (e.g. 48656c6c6f). However, when decoding, both uppercase (48656C6C6F) and lowercase inputs are accepted and decoded identically.
Why was my odd-length HEX input rejected?+
Each byte (8 bits) requires exactly two hexadecimal digits (4 bits per digit). An odd-length hexadecimal string (like "ABC") is incomplete and ambiguous, so strict validation rejects it to prevent silent data corruption.
