Hex Encoder / Decoder Tool
Convert text to hexadecimal and back. View text as hex bytes.
Your Security Matters: Client-Side Processing
- All operations happen in your browser.
- Your data, images, files, keys, or passwords are never stored or sent to our servers.
- We don't track or monitor your generated content.
What is Hexadecimal (Hex) Encoding?
Hexadecimal (or "Hex") is a **base-16** number system. It uses 16 symbols: the digits 0-9 and the letters A-F to represent values. Its primary purpose in computing is to provide a **human-readable representation of raw binary data**.
The Problem: Binary data (the 1s and 0s that computers use) is extremely difficult for humans to read. A single byte, like 01001000, is not intuitive.
The Solution: Hex simplifies this. A byte (8 bits) is split into two 4-bit "nibbles." Each 4-bit nibble can be represented by a *single* hex digit.
Example: 0100 = 4, and 1000 = 8. So, the binary 01001000 becomes the much shorter and more readable hex 48.
When you **convert text to hex**, you are taking each character (like 'H'), finding its byte value in a character set (like ASCII or UTF-8), and displaying that byte value as two hex digits.
Example: Hello → 48 65 6C 6C 6F
Key Use Cases for this Converter:
- Hex Dumps / File Viewing: A "hex dump" is the content of a file displayed in hex, byte by byte. This is how developers use a **hex editor** to see the raw structure of any file (images, executables, etc.), look for "magic numbers" (file signatures), or debug low-level data.
- Character Encoding (ASCII / UTF-8): This tool helps you see the exact byte representation of any text. You can see how a simple ASCII character like 'H' (
48) differs from a multi-byte UTF-8 character like '€' (E2 82 AC). - Data Representation: Programmers use hex to represent byte arrays, memory addresses, MAC addresses (e.g.,
00:1A:2B...), and web colors (e.g.,#FF0000). - Hex vs. Base64: Hex is a direct 1-to-1 byte mapping (1 byte → 2 chars), making it ideal for byte-level inspection. Base64 is more compact (3 bytes → 4 chars) and is better for *transmitting* binary data, not inspecting it.
Hex Encode/Decode Examples
Loading Hex examples...
Hex Encoding Best Practices & Key Concepts
Myth: Hex is Encryption
Like Base64, Hex is **not encryption**. It is an *encoding*, or more accurately, a *representation*. It provides zero security. Anyone can convert a hex string (like 48656C6C6F) back to text ("Hello") instantly. Never use it to hide sensitive data.
ASCII vs. UTF-8
The hex output depends entirely on the character encoding used. For basic English (ASCII), the values are simple (e.g., 'a' is 61). But for international characters (like 'é' or '€'), **UTF-8** must be used, which will result in multiple bytes (e.g., 'é' is C3 A9). This tool uses UTF-8 by default for universal compatibility.
Readability: Spaces & Delimiters
A long hex string like 48656C6C6F is hard to read. In "hex dumps," bytes are traditionally grouped in pairs with spaces (48 65 6C 6C 6F). This formatting is purely for human readability and has no effect on the data itself. Our tool provides options to add spaces or other delimiters for clarity.