Password Generator Jun 23, 2026

Why a Password Generator Using Math.random() Is Less Secure Than Its Length Suggests — Entropy, CSPRNG, and What to Check

A password generator using Math.random() is not cryptographically secure — a password's effective entropy is limited by the randomness quality of the generator, not just its length and character set. Here's what password entropy actually measures (bits of theoretical guessing difficulty), why crypto.getRandomValues() is categorically different from Math.random(), why length increases entropy faster than adding special characters, and how Diceware achieves verifiable physical randomness.

JSON Formatter Jun 23, 2026

Why JSON Doesn't Allow Comments — and the JSON5/JSONC Variants That Do (and Why They Break Standard Parsers)

JSON5 and JSONC add comments and trailing commas to JSON — and if you've ever tried to add a // comment to a tsconfig.json and wondered why VS Code allows it but JSON.parse() doesn't, you've encountered the JSON variant ecosystem. Here's why JSON has no comments by design, the three overlapping "JSON with comments" specifications, why standard parsers reject JSONC content, and the preprocessing approaches for handling these variants in automation.

JSON Diff Jun 23, 2026

Why Two Identical JSON Objects Look Different in a Diff — Normalization, Canonical Form, and the Array Problem

Two JSON objects with identical data can fail equality checks because of different key ordering — a false difference that corrupts any text-level diff. Here's the three normalization problems (key ordering, formatting, numeric representation), RFC 8785 canonical JSON for digital signatures, the practical parse-sort-serialize workflow for normalization before diffing, and why arrays create a harder normalization problem with no universal solution.

JSON Unescape & Cleaner Jun 23, 2026

Why JSON.parse() Fails for Large Files — Streaming Parsers, JSON Lines, and When to Use Each

Standard JSON.parse() requires the complete document before returning anything — which fails for large files that exceed memory and real-time streaming APIs that never "finish." Here's how streaming JSON parsers work (event-driven, token-by-token), JSON Lines as a simpler alternative that works with standard parsers, the specific use cases where streaming is necessary vs over-engineering, and when high-volume data transfer argues for protobuf instead of JSON entirely.

JWT Decoder Jun 23, 2026

JWT "Stateless" Is a Half-Truth — The Microservices Patterns That Account for the Other Half

JWTs are "stateless" — but deciding whether to trust the claims may require state, and confusing the two leads to architectural mistakes. Here's the microservices JWT validation dilemma (every service validates vs gateway-validates-services-trust), why encoding authorization roles in JWTs creates a stale-claims window problem, why the aud claim validation is commonly skipped (and why that's a vulnerability), and the mTLS + JWT separation of concerns that modern service meshes use.

Base64 Encoder/Decoder Jun 23, 2026

Base64 Makes Data 33% Larger — Here's the Exact Math and When That Overhead Actually Matters

Base64 makes data 33% larger — exactly, not approximately, because encoding 6 bits per character while binary uses 8 bits per byte produces a 4/3 size ratio as a direct mathematical consequence. Here's why that overhead is negligible for tokens and small images but significant for large file APIs, the common JSON-Base64-embedded-file pattern and its alternatives, and what validation steps most Base64 decoding code skips for untrusted input.

UUID Generator Jun 23, 2026

Reading a UUID: What the Hex Characters Actually Encode — and Why v1 Exposes Your Server's MAC Address

A UUID looks random but encodes information depending on its version: v1 embeds the creation timestamp and the generating machine's MAC address (recoverable by anyone who sees the UUID); v4 is genuinely random (122 random bits); v5 is deterministically computed from a namespace and name; v7 is timestamp-ordered with random low bits. Here's what each segment of a UUID actually contains, why v1 is a privacy risk in public-facing contexts, and when UUIDs shouldn't be used as security tokens.

URL Encoder/Decoder Jun 22, 2026

URL Encoding Context: Why a URL Inside Another URL, in HTML, and in a Shell Command All Need Different Treatment

A URL that works in a browser can fail in curl, JSON, or as a query parameter — because each context has different rules about which characters need encoding. Here's why "just URL-encode it" is underspecified without knowing the context, the encoding-within-encoding problem (a URL as a value inside another URL), why & needs HTML entity encoding in href attributes but not JSON, and the + vs %20 space ambiguity.

Bcrypt Generator Jun 22, 2026

bcrypt Work Factors Double With Each Increment — Here's How to Choose the Right One and Upgrade Existing Hashes

bcrypt's work factor doubles hashing time for every increment — work factor 10 is ~100ms, work factor 12 is ~400ms, work factor 14 is ~1.6 seconds. This exponential relationship is the design feature, not a side effect: when hardware gets faster, incrementing the work factor by 1 restores the original time cost. Here's how to choose the right factor, the opportunistic re-hash strategy for upgrading existing hashes without forcing logout, and how to read the work factor from a stored bcrypt hash string.

HTML Entities Jun 22, 2026

In UTF-8, Most HTML Entities Are Unnecessary — But These Five Still Are

HTML entities were invented to survive character encoding translation before UTF-8 was universal. In today's UTF-8 world, é and é are identical — but five entities (&, <, >, ", ') remain essential because they escape characters that have structural meaning in HTML, not encoding meaning. Here's which entities are legacy, which remain necessary, and why   is a special case that's about rendering behavior rather than encoding.

Timestamp Converter Jun 22, 2026

Unix Timestamps: Why 1970, What Happens Before It, and Why 2038 Still Matters for Some Systems

Unix timestamp 0 is January 1, 1970 — chosen somewhat arbitrarily by early Unix developers and now inherited by virtually every language, database, and API. Here's why negative timestamps (pre-1970) work in some systems and break in others, the Y2K38 problem's detailed mechanics (which embedded systems are still at risk), and why JavaScript's 13-digit millisecond timestamps cause a constant source of "date showing as 1970" bugs.

Hash Generator Jun 21, 2026

SHA-3 Exists Alongside SHA-2, Not Instead of It — The Architecture, Length Extension Vulnerability, and 2024 Usage Guide

SHA-3 was developed alongside SHA-2 — not because SHA-2 was broken, but as a precautionary hedge using a completely different design. SHA-2 uses Merkle-Damgård construction; SHA-3 uses a sponge construction. Here's the architectural difference, why Merkle-Damgård is vulnerable to length extension attacks (and how HMAC fixes it), why SHA-3 is immune to this by design, and a 2024 guide to which hash function to use for what purpose.