Encoding & Formats
Base64, URL encoding, JSON, timestamps, number bases and colour formats — specs, conversion and pitfalls.
Articles in this topic
Positional notation explains every base conversion in one idea — and why #FF5733 is just hex. Big-number and float pitfalls included.
Ten digits or thirteen? Why timestamps never change with timezones? How Unix time works and where conversions go wrong.
Mojibake is not lost data — it is bytes read with the wrong rule. Character sets vs encodings vs byte order, common symptoms, and a four-step fix.
Why does a space become %20 or a plus sign? The difference between encodeURI and encodeURIComponent, and the root of mojibake.
Trailing commas, single quotes, comments, unquoted keys — the usual reasons JSON validation fails, plus a fast debugging routine.
Why does one colour have three notations? When HSL helps most, when contrast matters, plus a WCAG cheat sheet.
UUID v4 is random, v1 carries time. Pros and cons as a primary key, and why "not unique" is not the same as "guessable".
What each color model is for. HEX is just RGB in hex, why HSL is better for tweaking, and how alpha is represented.
Use Base64 only to put binary into a text channel. It is not secret, it grows the size, and here is where it is misused.
Unvalidated input is where bugs and injection enter. What JSON Schema can and cannot do, plus where in the stack to apply it.
Photos, screenshots, icons and animations each want a different format. Lossy vs lossless, transparency, animation, and where to set quality.
The same character has several representations, so naive comparison fails. NFC, NFD and NFKC explained, plus correct storage, comparison and hashing.