Hex Decode

100% client-side processing (no server upload). Decode Hex back to readable text with selectable input formats (plain, 0x…, \xHH, %HH), optional separator handling, odd-length rules, and strict validation.

Loading…

About Hex Decoder (Text)

Use this page to decode Hex into text directly in your browser. You can accept common Hex notations like plain hex, 0x-prefixed values, C-style \xHH escapes, or percent-encoded %HH bytes, and choose how strict parsing should be. Need the opposite direction? Use the other page.

Features

  • 100% client-side processing (no server upload).
  • Decode multiple Hex notations: plain, 0x… prefix, C \xHH escapes, and %HH percent encoding
  • Strict validation toggle to reject malformed input early
  • Separator handling for spaced or tokenized hex (spaces, colons, dashes, underscores, commas, and whitespace)
  • Odd-length handling: error out or left-pad with 0 before decoding
  • Charset selection for bytes → text (unsupported charsets fall back to UTF-8)
  • Optional line-by-line processing and selectable output line endings (LF or CRLF)

How to use for hex-decoder

1

Paste or drop your Hex

Paste your hex input into the editor (you can also drop text files like .txt, .log, .md, .json). If your input contains 0x… prefixes, \xHH tokens, or %HH sequences, keep the matching "Accept" options enabled.

2

Click "Decode"

Select the expected input notation (plain / 0x / C escape / percent), choose whether to allow separators/whitespace, and decide how to handle odd numbers of hex digits. Turn on "Strict validation" if you want failures instead of best-effort parsing.

3

Copy or download the result

Review the decoded text output. Copy it to your clipboard or download it as a text file. If characters look wrong, try a different "Character set" for bytes → text.

Technical specifications

Execution Model

This page performs Hex decoding in your browser and does not upload your input to a server.

AspectDetail
Runtime100% client-side processing (no server upload).
Variant scopeDecode page (Hex → text)
Limits~1–2MB chars; ~25000 ms timeout
RetentionAll processing happens locally in your browser (no upload)
InputText (hex digits with optional prefixes/tokens and separators)
OutputText (bytes decoded then interpreted using the selected character set)
Even with local processing, avoid pasting secrets you can't afford to expose (screen sharing, browser extensions, telemetry, and copy/paste history can still leak data). Prefer local CLI decoding for sensitive material.

Mini Example

A minimal decode example using plain hex.

Input (plain hex): 48656c6c6f0a
Output (UTF-8): Hello
If your input uses tokens like "0x48 0x65" or "\x48\x65", enable the corresponding "Accept" options and allow separators if needed.

Errors & Edge Cases

Common decoding failures and the options that affect them.

SymptomLikely causeWhat to check
Invalid hex charactersInput contains non-hex characters (or malformed prefixes/tokens)Enable/disable "Ignore non-hex characters" and "Strict validation"; verify you selected the right format
Odd number of hex digitsTruncated input or missing a nibbleSet "Odd hex digits" to "Left-pad with 0" or keep "Error" to fail fast
Nothing decodes / empty outputAll characters were filtered out (lenient mode) or tokens weren't recognizedIf you expect tokenized input, enable "Accept 0x prefix" / "Accept \xHH escapes" / "Accept %HH encoding" and "Allow separators/whitespace"
Garbled characters (mojibake)Decoded bytes interpreted with the wrong charsetChange "Character set" (unsupported charsets fall back to UTF-8)
Different outputs per lineLine-by-line mode changes how text is split and recombinedDisable "Process line by line" if you need a single continuous decode

Command line alternatives

For secrets, automation, or reproducible pipelines, decode locally. Below are common, canonical options for Hex → bytes/text.

Linux/macOS

Decode plain hex to bytes (xxd)

printf %s "48656c6c6f0a" | xxd -r -p

xxd "reverse" mode converts a plain hex stream into raw bytes. Pipe to a viewer (cat) or a file redirect if needed.

Decode hex to UTF-8 text (Python)

python -c "import binascii; s='48656c6c6f0a'; print(binascii.unhexlify(s).decode('utf-8'))"

Unhexlify produces bytes; decode them with the correct charset (UTF-8 shown).

Node.js

Decode hex to UTF-8 text (Node Buffer)

node -e "const hex='48656c6c6f0a'; console.log(Buffer.from(hex,'hex').toString('utf8'));"

Buffer.from(hex, 'hex') parses plain hex (no 0x / C-style escapes). Strip prefixes/separators first if present.

Windows PowerShell

Decode plain hex to bytes and print as UTF-8

powershell -NoProfile -Command "$hex='48656c6c6f0a'; $bytes=for($i=0;$i -lt $hex.Length;$i+=2){ [Convert]::ToByte($hex.Substring($i,2),16) }; [Text.Encoding]::UTF8.GetString($bytes)"

Build a byte array from hex pairs, then decode bytes using UTF-8.

Use cases

Inspect encoded payloads

  • Turn a hex dump back into readable text during debugging
  • Quickly validate that a copied hex value actually represents the expected string

Pipeline troubleshooting

  • Decode hex fields from logs or messages to verify upstream transformations
  • Normalize inputs that mix separators or token styles before deeper analysis

CI sanity checks

  • Verify fixtures where test vectors are stored as hex strings
  • Fail fast with strict validation to catch malformed data early

Teaching bytes vs text

  • Demonstrate how bytes map to characters depending on charset choice
  • Show why odd-length hex or invalid digits must be handled explicitly

❓ Frequently Asked Questions

Is there a public API?

No. This tool is designed for interactive browser use and does not expose a public API.

Is processing local or remote?

100% client-side processing (no server upload). All decoding runs locally in your browser.

Can I paste secrets (API keys, passwords, tokens)?

It's safer not to. Even though decoding is local, secrets can still leak via screen sharing, browser extensions, clipboard history, or device compromise. For sensitive data, prefer local CLI decoding.

Why do I get a validation error or "invalid hex"?

Most failures come from non-hex characters, malformed prefixes/tokens, or an odd number of hex digits. Check the selected Hex format, enable the matching "Accept" toggles (0x / \xHH / %HH), and decide whether to allow separators and/or ignore non-hex characters. If you need strict parsing, enable "Strict validation" and disable "Ignore non-hex characters".

The decoded text looks corrupted. What should I do?

That usually means the bytes were interpreted with the wrong character set. Try changing "Character set" (for example UTF-8 vs ISO-8859-1). Unsupported charsets fall back to UTF-8.

Pro Tips

Best Practice

If you expect inputs like "0x48 0x65" or "\x48\x65", keep the matching "Accept" toggles enabled and allow separators/whitespace.

Security Tip

Use "Strict validation" + disable "Ignore non-hex characters" when you want decoding to fail fast instead of silently skipping junk.

Best Practice

If you hit odd-length hex, treat it as a data-quality signal. Only use "Left-pad with 0" when you're confident the missing nibble is intentional.

CI Tip

For CI or sensitive inputs, decode locally (xxd/Python/Node) to avoid browser and clipboard risks.

Additional Resources

Other Tools

🔓 Hex Decoder (Text) — decode Hex to text | Encode64