Security & Encoding
How JWTs, Base64, URL encoding, Unicode, hashes, passwords and UUIDs really work, with examples and the mistakes that cause real security bugs.
8 articles
- Security & Encoding
Security Headers on the Top 1,000 Sites: Only 1% Get an A+ (2026 Study)
We graded the security headers of 476 top sites: 1% get an A+, 19% an F, and only 6% send a Content-Security-Policy that really limits scripts.
· 5 min read
- Security & Encoding
MD5 vs SHA-1 vs SHA-256: Choosing the Right Hash Function
What hash functions do, why MD5 and SHA-1 are broken for security, when SHA-256 is right, why passwords need bcrypt or Argon2, and how HMAC signs messages.
· 6 min read
- Security & Encoding
Unicode and UTF-8 Explained: Why String Length Lies
Code points, UTF-8 bytes, UTF-16 code units and graphemes: why an emoji has length 2 in JavaScript, how mojibake happens, and how to count and compare text.
· 5 min read
- Security & Encoding
How Strong Is Your Password? Entropy Explained with Examples
Calculate password strength in bits of entropy, see how long real passwords take to crack, compare passphrases with random strings, and generate them safely.
· 5 min read
- Security & Encoding
URL Encoding Explained: Percent-Encoding, encodeURIComponent and Common Bugs
How percent-encoding works, when to use encodeURIComponent vs encodeURI, why + sometimes means a space, and how to fix double encoding and broken query strings.
· 6 min read
- Security & Encoding
UUID v4 vs v7: Which UUID Should You Use as a Database Key?
How UUID v4 and v7 are built, why random v4 keys slow down database indexes, what v7's timestamp reveals, and how to choose between UUIDs and integer IDs.
· 6 min read
- Security & Encoding
JWT Explained: Structure, Claims and How to Verify a Token
What is inside a JSON Web Token, how the signature works, which claims to check, and the security mistakes (alg none, weak secrets, storage) that break JWTs.
· 6 min read
- Security & Encoding
What Is Base64 Encoding? How It Works and When to Use It
How Base64 turns bytes into text, why it adds 33% to the size, Base64 vs Base64URL, handling UTF-8 in JavaScript, and why Base64 is never encryption.
· 7 min read