Encoding Detective — Identify Any Encoded String
Paste any string and instantly see which encoding it likely is — Hex, Base64, Base64URL, Base32, Base58, ASCII85, URL percent-encoding, or plain text — ranked by confidence, with a decoded preview.
Detection runs live in your browser. Nothing is uploaded. Whitespace is ignored; a dropped file's text content is analyzed.
What is Encoding Detective — Identify Any Encoded String?
The Encoding Detective identifies which encoding an unknown string uses. Paste anything — a hash-looking hex blob, a JWT segment, a TOTP secret, a crypto address, a percent-escaped URL — and get ranked candidates with the reasoning behind each score.
Zero-Server Tool Data Guarantee
All detection and decoding runs locally in your browser using JavaScript only. Your input never leaves your device — no server upload, no logging, no tracking.
How to Use
Paste the unknown string
Type, paste, or drop a text file. Analysis updates automatically after a short pause.
Read the best guess
The top result has the highest confidence based on alphabet, length, padding, and known-shape checks.
Inspect the evidence
Each candidate explains why it scored as it did — charset matches, length rules, padding, or famous prefixes.
Check the decoded preview
See what each candidate decodes to. Readable output confirms the match; binary output shows a hex dump.
Open the matching tool
Follow the deep link to the full encoder/decoder for the identified format.
Common Use Cases
Identify a mystery string
Found an opaque token in a config file, database row, or log line? Get ranked guesses with evidence in seconds.
Debug JWT fragments
Recognize base64url JWT header segments via the eyJ prefix and preview the decoded JSON claims.
Classify blockchain identifiers
Distinguish legacy Bitcoin addresses, WIF private keys, and IPFS CIDv0 hashes by their Base58 shape.
Recognize hash digests
Spot SHA-1/256/384/512 hex digests by their canonical 40/64/96/128-character lengths.
Recover TOTP secrets
Confirm that an uppercase A–Z2–7 string is RFC 4648 Base32 before feeding it to an authenticator app.
Implementation Examples
// Quick encoding fingerprint in plain JavaScriptfunction detectEncoding(input) {const s = input.trim();if (/^%[0-9a-fA-F]{2}(%[0-9a-fA-F]{2})*$/.test(s)) return 'url-encoded';if (/^[0-9a-fA-F]+$/.test(s) && s.length % 2 === 0 && s.length >= 2) {return 'hex';}const b64 = /^[A-Za-z0-9+/]+={0,2}$/.test(s);if (b64 && s.length % 4 !== 1) return 'base64';const b64url = /^[A-Za-z0-9_-]+={0,2}$/.test(s);if (b64url && s.length % 4 !== 1) return 'base64url';if (/^[A-Z2-7]+=*$/.test(s) && ![1, 3, 6].includes(s.replace(/=/g, '').length % 8)) {return 'base32';}if (/^[1-9A-HJ-NP-Za-km-z]+$/.test(s)) return 'base58 (or a plain word)';return 'unknown / plain text';}console.log(detectEncoding('SGVsbG8=')); // base64console.log(detectEncoding('48656c6c6f')); // hexconsole.log(detectEncoding('JBSWY3DPEHPK3PXP'));// base32
How the detective tells formats apart
| Format | Strongest signal |
|---|---|
| Hex | Even length, 0–9/A–F only, digest lengths 40/64/96/128 |
| Base64 | = padding, length divisible by 4, '+'/'/' alphabet |
| Base64URL | '-'/'_' alphabet, unpadded, eyJ prefix for JWTs |
| Base32 | Uppercase A–Z/2–7, legal lengths mod 8, '=' to 8-char blocks |
| Base58 | No 0/O/I/l, address shapes (1…/3…, Qm…, K/L…) |
| ASCII85 | <~ ~> delimiters, chars '!'–'u' only |
| URL-encoded | %XX sequences that decode to readable text |
| Plain text | Natural spacing and language, no structural fit |
Production Best Practices & Security
Frequently Asked Questions
The Encoding Detective identifies which encoding an unknown string uses. Paste any text — a hash-looking hex blob, a JWT segment, a TOTP secret, a crypto address, or a percent-escaped URL — and the tool ranks the likely candidates: Hex, Base64, Base64URL, Base32, Base58, ASCII85, URL percent-encoding, and plain UTF-8 text.
Each candidate comes with a confidence score, the evidence behind it, and a live decoded preview so you can verify the match before opening the full tool.