On your first CTFs, half of the "crypto" challenges are not crypto at all: they are encodings. The trick is to recognize them in a few seconds instead of throwing every decoder at the string. Here is the four-question method I use.

1. Which characters are used?

This single question eliminates most candidates.

Characters you see Likely encoding
Only 0 and 1, often in groups of 8 Binary
Only 0-9 and a-f (or A-F) Hexadecimal
A-Z, a-z, 0-9, +, /, maybe = at the end Base64
Same but - and _ instead of + and / Base64URL
Only A-Z and 2-7, lots of = padding Base32
Dots, dashes and spaces Morse
% followed by two hex digits URL encoding
Readable letters, but words look like nonsense ROT13 or another Caesar shift

2. What is the length?

  • Base64 output length is always a multiple of 4 (with padding).
  • Hex always has an even number of characters: two per byte.
  • Base32 is a multiple of 8, padded with =.
  • Binary usually comes in blocks of 8 bits.

3. How does it end?

One or two = at the end almost always means Base64. Up to six = points to Base32. No padding does not rule Base64 out, though: many tools strip it.

4. Are there dots splitting it in three parts?

A string like eyJhbGciOi...eyJzdWIiOi...SflKxwRJ... is a JWT. Each part is Base64URL. The first two decode to JSON (header and payload); the third is the signature. Tip: eyJ is what {" looks like in Base64, so any string starting with eyJ is probably Base64-encoded JSON.

Classic traps

  • Layered encodings: decode once, and you get... more Base64. Keep going until it stops changing.
  • Hex that looks like Base64: deadbeef is valid in both alphabets. Hex is the better guess when only a-f letters appear.
  • ROT13 on top of Base64: the alphabet still looks like Base64, but decoding gives garbage. Try ROT13 first.
  • Encoding is not encryption: if nothing decodes, you may actually be facing a cipher or a hash (a 64-character hex string is often a SHA-256).

Tooling

CyberChef is the reference for chaining operations. For quick checks, I built a free decoder that auto-detects these formats and reads JWTs, entirely in the browser (French UI): Base64 / hex / ROT13 / Morse / JWT decoder.

This is an English adaptation of my original article in French: Reconnaître un encodage au premier coup d'œil. I'm Edouard, a cybersecurity student at Lille YNOV Campus (France).