HT
Hex to Text Converter
Convert text to hexadecimal and decode hex strings back to text — see the exact byte values behind every character.
More Encoding & Crypto Tools
How to Use Hex to Text Converter
Type text to see its hexadecimal byte representation (space-separated hex pairs), or paste a hex string and decode it back to text. Handles all UTF-8 text correctly, showing multi-byte characters as their full hex sequence. Copy the result with one click.
About Hex to Text Converter
Hexadecimal (hex, base-16) is the shorthand programmers use to talk about bytes. Where binary uses 1s and 0s and needs 8 digits to describe a single byte, hex does it in exactly 2 digits — 01000001 is cumbersome to read and write, but 41 is the same byte in a compact, human-friendly form. Every pair of hex digits (0-9, A-F) represents one byte (0-255 in decimal, 00000000-11111111 in binary), and strings of hex pairs are how raw data is displayed in debugging tools, network packet captures, binary file dumps, and cryptographic output — the SHA-256 hash of the word hello is displayed as a 64-character hex string, not as a long string of binary.\n\nThis tool converts text to hex by encoding it as UTF-8 bytes and showing each byte as a lowercase two-character hex value. The result is space-separated by default for readability: the word Hello becomes 68 65 6c 6c 6f. An emoji becomes four hex pairs: f0 9f 98 8a, matching its 4-byte UTF-8 encoding. The tool also plays the reverse role: paste a hex string (68 65 6c 6c 6f, spaces optional) and it decodes the bytes back to the original text using UTF-8. This back-and-forth is lossless — any text you encode to hex will decode back to exactly the same text — because UTF-8 is a complete, well-defined encoding and hex is a faithful representation of the bytes.\n\nWhat makes hex useful beyond just being compact? Hex is how colours are represented on the web — #2563EB is a 3-byte hex triplet for red, green, and blue. It is how memory addresses are shown in debuggers — 0x7ffeeb5c makes more sense than a decimal equivalent. It is how cryptographic output is displayed — every hash, every HMAC, every ciphertext you see in a blog post or API documentation is a hex string of its raw bytes. It is how binary file formats are inspected — open a PNG in a hex editor and the first bytes are the ASCII characters for PNG spelled out, with the file signature visible as hex pairs. Hex is the universal language for talking about bytes, and this tool makes it easy to translate between the hex representation and the human-readable text it encodes.
Details & Tips
Hex encoding format: each byte is represented by exactly two lowercase hex characters (0-9, a-f), left-padded with a zero if the value is less than 16 (0x0A is shown as 0a, not a). Bytes are separated by a single space in the encoded output for readability — this can be toggled off. The total number of hex characters (not counting spaces) is always exactly twice the number of UTF-8 bytes in the input.\n\nUTF-8 character sizes visible in hex: ASCII characters produce two hex chars each. Latin-1 supplement and other 2-byte UTF-8 characters produce four hex chars. CJK and 3-byte characters produce six hex chars. Emoji and 4-byte characters produce eight hex chars. This makes hex an excellent tool for understanding UTF-8 encoding visually — you can see at a glance how many bytes each character consumes and which byte patterns identify multi-byte sequences (the cX, eX, fX leading byte patterns are easy to spot in hex).\n\nDecoding robustness: the tool strips all non-hex characters (spaces, newlines, tabs, hyphens, colons — hex dumps from various tools use different separators) before parsing, so input from a Wireshark capture (68:65:6c:6c:6f), a hex editor (68 65 6C 6C 6F), or a programming language escape sequence all decode correctly. A hex string with an odd number of characters after cleaning is rejected with an error — each byte requires exactly 2 hex characters. Non-hex characters that are not whitespace trigger an error. Invalid UTF-8 byte sequences in the decoded data produce replacement characters rather than crashing.\n\nUppercase/lowercase handling: hex digits can be uppercase (A-F) or lowercase (a-f) — they mean exactly the same thing. Input is normalized to lowercase before parsing. Output hex is always lowercase, matching the conventions used in most programming languages (JavaScript, Python, Ruby) and web standards (CSS hex colours are case-insensitive but conventionally lowercase).
Frequently Asked Questions
Does hex use uppercase or lowercase letters?
Both are equivalent — 5A and 5a mean exactly the same byte (90 in decimal). This tool accepts both on input and outputs lowercase by convention, matching how most programming languages display hex.
Why does a single character like an accented e or an emoji produce multiple hex pairs?
Characters outside the ASCII range require 2-4 bytes in UTF-8 encoding. Each byte becomes one hex pair. An accented e (2 bytes) produces 4 hex chars; an emoji (4 bytes) produces 8 hex chars.
Can I paste hex from a hex editor, Wireshark, or a programming debugger?
Yes. The tool strips spaces, newlines, colons, hyphens, and other common separators automatically, so hex dumps from any tool just work — as long as the input contains valid hex character pairs.
What is the difference between hex and Base64 encoding?
Hex uses 2 characters per byte (output is 2x the input size). Base64 uses 4 characters per 3 bytes (output is about 1.33x larger). Hex is easier to read by eye because each byte is exactly two characters. Base64 is more compact for embedding in text protocols.
Why is hex used for colours in CSS?
A colour like #2563EB is a hex encoding of three bytes — one for red (0x25=37), one for green (0x63=99), one for blue (0xEB=235). Two hex digits per channel is compact, precise, and easy to copy between design tools.
What happens if my hex string has an odd number of characters?
An error is shown — each byte requires exactly 2 hex characters. Check for missing or extra characters in your input.
Can I use this to convert hex colours to RGB values?
Not directly — this tool converts hex to text, not to numbers. But it can show you the ASCII character each byte represents. For colour conversions, use a dedicated Color Converter tool.
Is my text sent to a server?
No. All conversion runs in your browser using JavaScript — nothing you type or paste is transmitted, logged, or stored anywhere.
What does 0x mean before a hex number?
0x is a prefix used in many programming languages (C, JavaScript, Python, etc.) to indicate that a number is written in hexadecimal. This tool strips 0x prefixes automatically when decoding, so you can paste values directly from code.
How can I tell if a hex string represents text or binary data?
Try decoding it. If the result is readable text, the hex data was UTF-8 encoded text. If you see gibberish, question marks, or replacement characters, the hex data is probably binary (an image, encrypted data, a compressed file) — not text.
Part of These Collections
Also Available As
hex to text, text to hex, hex converter, hex translator, hex decoder, hex encoder, hexadecimal to text, convert hex to ascii
Explore More Tools
View all toolsFound a Problem?
Let us know if something with Hex to Text Converter isn't working as expected.
Something went wrong. Please try again.
Thanks — we'll take a look.