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.
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
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.
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.
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.
| Aspect | Detail |
|---|---|
| Runtime | 100% client-side processing (no server upload). |
| Variant scope | Decode page (Hex → text) |
| Limits | ~1–2MB chars; ~25000 ms timeout |
| Retention | All processing happens locally in your browser (no upload) |
| Input | Text (hex digits with optional prefixes/tokens and separators) |
| Output | Text (bytes decoded then interpreted using the selected character set) |
Mini Example
A minimal decode example using plain hex.
Input (plain hex): 48656c6c6f0a
Output (UTF-8): Hello
Errors & Edge Cases
Common decoding failures and the options that affect them.
| Symptom | Likely cause | What to check |
|---|---|---|
| Invalid hex characters | Input 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 digits | Truncated input or missing a nibble | Set "Odd hex digits" to "Left-pad with 0" or keep "Error" to fail fast |
| Nothing decodes / empty output | All characters were filtered out (lenient mode) or tokens weren't recognized | If 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 charset | Change "Character set" (unsupported charsets fall back to UTF-8) |
| Different outputs per line | Line-by-line mode changes how text is split and recombined | Disable "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 -pxxd "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?
API.Is processing local or remote?
Can I paste secrets (API keys, passwords, tokens)?
Why do I get a validation error or "invalid hex"?
The decoded text looks corrupted. What should I do?
Pro Tips
If you expect inputs like "0x48 0x65" or "\x48\x65", keep the matching "Accept" toggles enabled and allow separators/whitespace.
Use "Strict validation" + disable "Ignore non-hex characters" when you want decoding to fail fast instead of silently skipping junk.
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.
For CI or sensitive inputs, decode locally (xxd/Python/Node) to avoid browser and clipboard risks.
Additional Resources
Other Tools
- CSS Beautifier
- HTML Beautifier
- Javascript Beautifier
- PHP Beautifier
- Color Picker
- Sprite Extractor
- Base32 Binary Encoder
- Base32 Decoder
- Base32 Encoder
- Base58 Binary Encoder
- Base58 Decoder
- Base58 Encoder
- Base62 Binary Encoder
- Base62 Decoder
- Base62 Encoder
- Base64 Binary Encoder
- Base64 Decoder
- Base64 Encoder
- Hex Binary Encoder
- Hex Encoder
- Csharp Formatter
- Csv Formatter
- Dockerfile Formatter
- Elm Formatter
- ENV Formatter
- Go Formatter
- Graphql Formatter
- Hcl Formatter
- INI Formatter
- JSON Formatter
- Latex Formatter
- Markdown Formatter
- Objectivec Formatter
- Php Formatter
- Proto Formatter
- Python Formatter
- Ruby Formatter
- Rust Formatter
- Scala Formatter
- Shell Script Formatter
- SQL Formatter
- SVG Formatter
- Swift Formatter
- TOML Formatter
- Typescript Formatter
- XML Formatter
- YAML Formatter
- Yarn Formatter
- CSS Minifier
- Html Minifier
- Javascript Minifier
- JSON Minifier
- XML Minifier
- Http Headers Viewer
- PDF To Text
- Regex Tester
- Serp Rank Checker
- Whois Lookup