Tools / Hex ↔ Text Converter

Hex ↔ Text Converter.

Convert text to hexadecimal bytes and hex dumps back to UTF-8 text.

Runs in your browser

Ctrl/⌘ + Enter to run · Ctrl/⌘ + Shift + C to copy the result

Result
Result
Details

About Hex ↔ Text Converter

Hex ↔ Text turns a string into the hexadecimal values of its UTF-8 bytes and turns a hex dump back into readable text. Each byte becomes two hex digits, so "Hi" is 48 69 and the Cyrillic letter "П" is the two bytes d0 9f. That last detail is the most common source of confusion: hex represents bytes, not characters, so anything outside ASCII takes two to four bytes and the hex output is longer than you might expect. When decoding, the tool is forgiving about formatting. It accepts digits separated by spaces, colons, commas, dashes or new lines, strips 0x and \x prefixes, and ignores case, so you can paste output from xxd, Wireshark, a C array or a MAC-address-style string without cleaning it first. If the input has an odd number of digits or contains a character that is not 0–9 or a–f, the error message shows the line and column of the problem. When the decoded bytes are not valid UTF-8, invalid sequences are shown as the replacement character � and the details panel says so, which usually means the data is binary or uses another encoding such as Latin-1. For encoding you can choose the separator, upper-case digits and a 0x prefix for each byte, which is handy when you need a byte list for code. Typical uses are debugging protocol payloads, inspecting what an API actually sent, checking invisible characters such as non-breaking spaces (c2 a0) or a byte-order mark (ef bb bf), and preparing test vectors. Conversion runs in your browser and nothing you paste leaves the page.

How to Use

  1. Choose encode to turn text into hex, or decode to turn hex into text.
  2. Paste your input; separators and 0x prefixes are handled automatically when decoding.
  3. Pick the output format and copy the result.

Frequently Asked Questions

Why is the hex for non-English text longer than the text?

The tool encodes text as UTF-8. ASCII characters take one byte, but Cyrillic, Greek or accented letters take two bytes, most Asian characters take three, and emoji take four. Each byte is two hex digits.

What happens if the hex is not valid UTF-8?

Invalid sequences are replaced with � and the details show "valid UTF-8: false". That usually means the bytes are binary data or text in another charset.

Which formats can I paste for decoding?

Plain digits (48656c6c6f), separated bytes (48 65 6c), colon notation (48:65:6c), 0x48 0x65 and \x48\x65 escapes. Upper and lower case both work.

Is my input sent to a server?

No. The conversion runs entirely in your browser.

Related Tools