Convert hex to text

Paste any hexadecimal stream and get the matching text back. The hex to text converter strips whitespace and any 0x prefixes from your input, then reads the remaining hex digits two at a time and emits the matching character via String.fromCharCode. The transform runs in your browser; nothing uploads.

Input
Line 1:1 LF cloud_done Saved locally
Result Hex to Text
0 lines 0 chars

Hex to text, plain and predictable

Hex to text decoding takes a stream of hexadecimal digits, strips every 0x prefix and every whitespace character, and reads the remaining digits two at a time. Each two-digit pair is parsed with parseInt(pair, 16) and passed to String.fromCharCode to produce the matching character. So 48 65 6c 6c 6f decodes to Hello, and 0x48 0x65 decodes the same as 4865 after the prefixes and spaces strip away.

Whitespace is normalised before the split, so spaces, tabs, newlines and carriage returns all behave the same. The case of the hex digits does not matter: 4865, 4865, 4865 and 48 65 all decode to He. If the digit count after stripping is odd, the final pair gets only one digit and decodes to a low code point (so a stray digit produces a stray character). If a pair contains a non-hex character, the output panel shows [invalid hex] instead of partial text.

The decoder always reads pairs of two digits, regardless of how the source separated chunks. That matches the most common encoding (one byte per character, ASCII or Latin-1). If your hex stream uses four-digit chunks for a UTF-16 code unit, split each chunk into two pairs first, or feed the whole stream in and trust that String.fromCharCode handles each byte as a separate character. For the inverse direction, see text to hex.

How to use convert hex to text

  1. 1Paste a hexadecimal stream into the input panel on the left.
  2. 2The decoded text appears in the output panel on the right as you type.
  3. 3Click Copy in the output header to copy the result.
  4. 4Click Download to save the result as a plain-text file.
  5. 5If the output reads [invalid hex], check that every chunk contains only hex digits.

Keyboard shortcuts

Drive TextResult without touching the mouse.

Shortcut Action
Ctrl FOpen the find & replace panel inside the input Plus
Ctrl ZUndo the last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor Plus
EscClose find & replace, or exit fullscreen
Ctrl KOpen the command palette to jump to any tool Plus
Ctrl SSave current workflow draft Plus
Ctrl PRun a saved workflow Plus

What this tool actually does

Whitespace and prefix stripping

Every 0x prefix is removed before the parse. Every whitespace character (space, tab, newline, carriage return) is removed too. So 0x48 0x65 and 4865 and 48 65 all decode to the same two characters.

Two-digit pair decoding

After stripping, the remaining digits are read two at a time. Each pair parses with parseInt(pair, 16) and feeds String.fromCharCode. So 48 becomes char code 72, which is H. Pairs decode independently, with no shared state across the stream.

Case-insensitive hex digits

Upper and lower case hex digits are treated identically. 4865, 4865, 4865, and 48 65 all decode to He. The strip uses 0x matching with the case-insensitive flag, so 0X48 works too.

Invalid input shows a clear marker

If a pair contains a character that is not a hex digit (a stray g, a comma, a letter), the parse fails and the output panel shows [invalid hex] instead of partial text. Fix the source and the output refreshes on the next keystroke.

Runs entirely in your browser

No upload, no server-side processing, no log of what you pasted. The decode runs on every keystroke via a single JavaScript pass. Long streams of a few hundred kilobytes still decode in under a second on a desktop browser.

Worked example

Five two-digit pairs decode to the five characters of Hello via String.fromCharCode.

Input
48 65 6c 6c 6f
Output
Hello

Settings reference

Behaviour Effect on output
Whitespace stripping Every space, tab, newline and carriage return is removed before the parse.
0x prefix stripping Case-insensitive. Removed before the parse so 0x48 and 48 behave identically.
Pair width Always two digits per character. Wider chunks split into pairs.
Case sensitivity Upper and lower case hex digits decode identically.
Empty input Emits an empty string.
Invalid pair Output shows [invalid hex]; no partial text is emitted.
Odd digit count The final pair has only one digit and decodes to a low code point, which usually produces a stray character.

FAQ

Does it accept 0x-prefixed input?
Yes. The decoder strips every 0x (or 0X) prefix before parsing, regardless of where it appears in the stream. So 0x48 0x65 decodes the same as 4865. The strip is case-insensitive.
What chunk width does the decoder use?
Always two digits per character. The decoder reads pairs left to right after stripping. If your source uses four-digit chunks for UTF-16 code units (0048 for H), the decoder still reads it as two two-digit pairs, which produces \x00H. For ASCII or Latin-1 streams, two-digit pairs are exactly right.
Why does the output read [invalid hex]?
A pair in the input contains a character that is not a hex digit after whitespace and prefixes are stripped. Look for stray punctuation, commas, or non-hex letters in the source. The output refreshes the moment the input is valid hex again.
Is the hex sent anywhere?
No. The decode runs entirely in your browser via JavaScript. Nothing is uploaded, nothing is logged, no record of your text exists on our servers.
How do I go the other way?
Paste your text into text to hex. That tool converts each character to its hex char code, with toggles for the 0x prefix, two-digit padding and inter-chunk spacing.