Base64 without tears (Unicode!)
Base64 turns bytes into ASCII so binary survives text-only channels (emails, JSON, URLs). The tears come from Unicode: btoa() handles Latin-1 only — '✓' breaks unless you UTF-8-encode first.
Rule: TextEncoder → bytes → base64 on the way in; base64 → bytes → TextDecoder on the way out. For URLs use the URL-safe alphabet (-_ instead of +/) and drop padding.
Mistakes: btoa(unicode) throwing or mojibake, pasting wrapped lines with newlines into decoders, and treating base64 as encryption (it is packaging, readable by anyone).
Example: 'Hello ✓' → UTF-8 bytes → 'SGVsbG8g4pyT'. Decode with the same UTF-8 step and the checkmark survives.
Try: Base64 Encode / Decode · URL Encode / Decode
JWTs: what decode proves and what it doesn't
Decoding a JWT proves nothing about trust: header and payload are base64url anyone can read — only a server-side signature check proves it was issued by who it claims.
Read the payload for debugging (user id, expiry exp, scopes), then verify the signature where secrets live. An expired-but-valid-signature token is a clock problem; a bad signature is a forgery problem.
Mistakes: hiding secrets in JWT payloads (they are readable), accepting alg:none tokens, trusting client-side 'verification', and ignoring exp/leeway (60s) in distributed clocks.
Example: exp 1788297600 → 2026-09-08T00:00:00Z. Past that, the token is decoration — reject before any other check.
Try: JWT Decoder · Checksum Verifier
CIDR notation in one page
CIDR in one page: /24 means the first 24 bits are network, leaving 8 for hosts (254 usable). Mask 255.255.255.0, network .0, broadcast .255, usable .1–.254.
Size table to memorize: /30 = 2 hosts (links), /29 = 6, /24 = 254, /16 = 65,534, /8 = 16.7M. Each bit you take back from hosts doubles the networks and halves each one.
Mistakes: counting network/broadcast as usable, forgetting that .0 and .255 rules change below /24… no — they always apply per subnet, and overlapping two subnets (10.0.0.0/23 contains 10.0.1.0/24).
Example: 192.168.1.0/24 → mask 255.255.255.0, range .1–.254, broadcast .255. Need 500 hosts? /23 (510 usable), not /24.
Try: CIDR / Subnet Calculator · IP ⇄ Integer