Text to Hex Converter
Convert text to hexadecimal and back in one click. Every character becomes two hex digits, with UTF-8 support for any language and a spaced or compact output option.
Runs in your browser — your code and data never leave this device
How do I convert text to hex?
Type or paste your text: this free online text to hex converter turns every character into its hexadecimal code, with UTF-8 support so any language and emoji work, not just English. It converts back too — paste hex and get the original text, with or without the 0x prefix.
Non-English characters are encoded as UTF-8, so one character can take more than one byte: the letter A is one byte (41), while an accented letter or an emoji takes two to four.
Related tools
How to use the Text to Hex Converter
- Type your text in the Input box, or click Sample to load a short example.
- Click Text to Hex. Each character becomes one or more pairs of hex digits.
- To go back, paste hex — with or without spaces, with or without a 0x prefix — and click Hex to Text.
- Copy the result. The Spaces between bytes option controls whether the hex is grouped for readability.
For the full picture — what hexadecimal is, how text becomes hex, and where hex shows up — read our guide: How to Convert Text to Hex (Free, UTF-8).
What hexadecimal is
Hexadecimal, or hex, is base 16: it counts with sixteen digits, 0 to 9 followed by A to F, where A means 10 and F means 15. It exists because it is the perfect shorthand for binary. One hex digit holds exactly four bits, so one byte — eight bits — is exactly two hex digits. The letter A, binary 01000001, is hex 41. The letter H is hex 48. Two characters instead of eight.
That compactness is why hex is everywhere in computing. Colours on the web are hex — #FF5733 is a red-orange. Memory addresses, file signatures, cryptographic hashes and network data are all shown in hex, because it is short enough for a human to read and exact enough for a machine to trust.
How text becomes hex
The conversion has two steps. First, each character is turned into its number in the UTF-8 encoding: A is 65, a is 97, a space is 32. Then each number is written in hexadecimal, padded to two digits, so 65 becomes 41 and 97 becomes 61. Characters outside English take two to four bytes in UTF-8, so an accented letter becomes two hex pairs and an emoji becomes four.
Decoding reverses the process: the hex digits are read in pairs, each pair becomes a byte, and the bytes are read back as UTF-8 text. If the hex has an odd number of digits, or the bytes do not form valid UTF-8, the tool says so plainly instead of guessing — a wrong guess would silently corrupt the text.
Where you will meet hex
Hex turns up whenever raw data needs to be shown to a human. Web developers see it in colour codes. Security work is full of it: password hashes, checksums and digital signatures are all printed in hex. File analysis starts with a hex dump, where the first bytes of a file identify its format — a PNG image always starts with 89 50 4E 47, which spells PNG in ASCII.
For most people, converting text to hex is a learning exercise or a puzzle step: seeing Hello become 48 65 6C 6C 6F makes the idea of encoding concrete in a way that reading about it does not. It is the same text, wearing a different costume — and once you have seen the pattern, hex stops looking like gibberish.
UTF-8 hex, spaced or compact: text to hex and back
Convert text to hexadecimal UTF-8 and every character becomes two hex digits per byte: an English letter is one byte, so two digits, while accented letters take 2 bytes, most other scripts 3, and emoji 4 — which is why one letter sometimes becomes more than two hex digits. The spaced output groups the pairs for reading, and the compact output joins them into one unbroken string.
As a hex to text converter online free, the decode direction is just as useful: paste hex — from a tutorial, a data dump or a message — and read the text behind it. The decoder accepts hex with spaces or without, and with the 0x prefix or without, so you can paste it exactly as you found it. If the hex is invalid, the converter says so plainly: check for an odd number of digits or a character that is not a hex digit.
Frequently asked questions
Why does one letter sometimes become more than two hex digits?
Because this tool uses UTF-8. English letters take one byte, or two hex digits, but accented letters take two bytes, most other scripts take three, and emoji take four.
Do the spaces between hex pairs matter?
No. They are only for readability. The decoder ignores spaces, line breaks and 0x prefixes, so you can paste hex in any common format.
Why does my hex say it is invalid?
Hex must have an even number of digits, one pair per byte, and the bytes must be valid UTF-8. Check for an odd digit count or a character outside 0 to 9 and A to F.
What is the difference between hex and binary?
Both represent the same bytes. Binary writes each byte as 8 digits of 0 and 1; hex writes each byte as 2 characters. Hex is four times shorter and much easier to read.
Is my text uploaded anywhere?
No. This tool runs entirely in your browser using JavaScript. Your text is never uploaded, stored or sent anywhere — everything stays on this device.
Can I convert hex back to text?
Yes — paste the hex and the converter returns the original text. Spaces in the hex are ignored, and the 0x prefix is accepted with or without spaces, so you can paste the hex exactly as you found it.
Does it work with emoji?
Yes. The converter uses UTF-8, so emoji and any language convert correctly — each character takes 1 to 4 bytes depending on the script, which is why emoji become much longer strings of hex digits than English letters.
What does the 0x prefix mean?
It is a marker that the number after it is hexadecimal, used in code to tell hex apart from decimal. The decoder accepts hex with or without it, so 0x48656C6C6F and 48656C6C6F decode to the same text.