GUIDE · Updated 2026-10-24

What Encoding Is This? Identify Base64, Base32, Base58, Hex and URL Encoding

Encoding isn't encryption: once you recognize the format, you can get the original back. This guide uses three checks — characters, length and prefix — to identify the most common encodings, and shows how to avoid mistaking a hash for an encoding.

Check 1: the character set

Each encoding uses a different alphabet, which makes this the fastest check:

  • Hex: only 0–9 and a–f (or A–F), even length — e.g. 666c6167
  • Base64: A–Z, a–z, 0–9, + and /, possibly ending in one or two =; the URL-safe variant uses - and _ instead of + and /
  • Base32: A–Z and 2–7, often padded with = to a multiple of 8 — TOTP secrets use it
  • Base58: no easily confused characters like 0, O, I and l; common in Bitcoin addresses
  • Ascii85: lots of punctuation, sometimes wrapped in <~ and ~>
  • URL encoding: percent signs followed by two hex digits, like %2F or %20
  • Unicode escapes: \u0066, \x66 or &#102;

Check 2: the length

Base64 length is usually a multiple of 4 and Base32 a multiple of 8. Be careful with exactly 32, 40, 64 or 128 hex characters: that's likely an MD5, SHA-1, SHA-256 or SHA-512 hash, and hashes are one-way — they can't be decoded.

Check 3: the prefix

Some prefixes practically identify the content: Base64 eyJ decodes to {", meaning JSON (a JWT is three of these joined by dots); eJ is zlib; H4sI is gzip; iVBOR is a PNG; UEsDB is a ZIP; JVBER is a PDF.

What about multiple layers?

Malware and CTF challenges often stack encodings — URL encoding around Base64 around hex, for example. The layered decoder tries each layer automatically and records every step. If you also need XOR or decompression along the way, build the order yourself with the recipe chain.

Common false positives

A purely numeric or hex string can also be valid Base64 and decode to garbage — whether the result is readable tells you which it is. Garbage after Base64 decoding isn't always a mistake either: it may be compressed or encrypted binary data, so look at the magic bytes in a hex view.

FAQ

FAQ

What's the difference between encoding and encryption?

Encoding is just another representation that anyone can reverse; encryption needs a key. Base64 isn't encryption and shouldn't be used to protect passwords or sensitive data.

Why does my Base64 decode to garbage?

You may have the wrong format or incomplete data, or the original content is binary (an archive, image or encrypted data). The magic bytes at the start usually tell you which.

Can MD5 be decoded?

No. MD5 and the SHA family are hash functions designed so the input can't be recovered. Online "MD5 decrypters" just look the hash up in precomputed tables.