UTILS.
Private by default
⬡

Hex ↔ Text

Convert text to hexadecimal bytes and decode hex back to text.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
— output appears here —

About this tool

Turn text into its hexadecimal byte values and back again, with UTF-8 support, running fully in your browser.

Text to hex converts your text to UTF-8 bytes and writes each byte as two lowercase hex digits. The space separated option, on by default, puts a space between bytes. Characters outside basic ASCII use several bytes, so an accented letter or emoji produces more than one pair of digits.

When decoding, the tool removes 0x and \x prefixes and then discards every character that is not a hex digit. The remaining digits are read in pairs and must form valid UTF-8 text; an odd digit count or invalid bytes show a "not valid hex" message. Because stray characters are dropped silently, a typo such as the letter g can change the result or leave an odd count.

Frequently asked questions

What does space separated do?
It inserts a space between each byte when encoding, e.g. 48 69 instead of 4869.
What input does decoding accept?
Any hex string — spaces, newlines and 0x noise are stripped before pairing the digits into bytes.
Why does decoding fail when every character looks right?
Check that the number of hex digits is even and that the bytes form valid UTF-8 text. Binary data that is not text, such as part of an image, cannot be displayed here.

More tools