Text and hexadecimal converter
Encode text as the hexadecimal digits of its UTF-8 bytes, or decode hexadecimal bytes back to text.
Your result
Your result will appear here.
About text and hexadecimal converter
Use this to see the exact bytes behind a piece of text, or to read bytes written in hexadecimal as text again. Text to hexadecimal helps you find a hidden character, compare 2 strings that look the same, or prepare a hex value for a protocol or a test. Hexadecimal to text reads hex dumps, encoded values from logs and byte strings in documentation. Both directions treat text as UTF-8.
How it works
For Text to hexadecimal, StillKit encodes the text as UTF-8 and writes each byte as 2 lowercase hexadecimal digits, with no spaces or separators. A plain English letter gives 2 digits, and other characters give 4, 6 or 8. For Hexadecimal to text, it removes all whitespace, checks that an even number of hexadecimal digits remains, turns each pair into a byte and decodes the bytes strictly as UTF-8. Capital and small letters A to F both work.
Tips
- An ordinary space shows as 20, a non-breaking space as c2a0 and a zero-width space as e2808b. That helps track down text that refuses to match.
- Line breaks appear as 0a. The box stores line breaks as LF, so you will not see 0d0a even for text copied from a CRLF file.
- Before decoding, remove prefixes and separators: 0x, \x, colons and commas are rejected. Find and replace can delete them.
- An odd number of digits means a byte was cut in half, so check the start and end of what you copied.
- Bytes that are not valid UTF-8, such as part of an image, stop the decoder rather than producing garbled characters.
Limits
Maximum 1 MB of input. Decoding needs an even number of hexadecimal digits, with or without spaces between them, and the bytes must be UTF-8 text. Prefixes such as 0x are not accepted.
How tools run on your device →Questions and answers
How do I turn hex digits back into text?
Set Direction to Hexadecimal to text and paste the digits in place of the example, with or without spaces and line breaks. 48656c6c6f gives Hello.
Why does one character give 4, 6 or 8 digits?
UTF-8 stores a character in 1 to 4 bytes, and each byte is 2 digits. A is 41, é is c3a9 and the euro sign is e282ac. Most emoji take at least 4 bytes, so 8 digits or more.
Is this the same as converting a number to hexadecimal?
No. This tool converts the bytes of text, so the text 255 becomes 323535. To write the number 255 in base 16, which is ff, use Number base converter.