← Knowledge Base

Encoding & Formats

Base64, URL encoding, JSON, timestamps, number bases and colour formats — specs, conversion and pitfalls.

Articles in this topic

Number Bases Made Intuitive: Binary, Hex and Color Codes

Positional notation explains every base conversion in one idea — and why #FF5733 is just hex. Big-number and float pitfalls included.

7 min readNumber basesBeginner
Unix Timestamps 101: Seconds vs Milliseconds, UTC and Timezones

Ten digits or thirteen? Why timestamps never change with timezones? How Unix time works and where conversions go wrong.

6 min readTimePitfalls
Character Encoding and UTF-8: Why Text Turns into Gibberish

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.

6 min readUnicodeBeginner
URL Encoding: When You Need It, and Where %20 and + Come From

Why does a space become %20 or a plus sign? The difference between encodeURI and encodeURIComponent, and the root of mojibake.

7 min readURLEncoding
JSON Keeps Failing? Four Details That Trip Everyone

Trailing commas, single quotes, comments, unquoted keys — the usual reasons JSON validation fails, plus a fast debugging routine.

6 min readJSONPitfalls
Colour Formats 101: HEX, RGB, HSL and Accessible Contrast

Why does one colour have three notations? When HSL helps most, when contrast matters, plus a WCAG cheat sheet.

7 min readColourBeginner
UUIDs and Random IDs: Can They Be Primary Keys

UUID v4 is random, v1 carries time. Pros and cons as a primary key, and why "not unique" is not the same as "guessable".

7 min readIdentifiersBeginner
How RGB / HEX / HSL Convert

What each color model is for. HEX is just RGB in hex, why HSL is better for tweaking, and how alpha is represented.

6 min readColourBeginner
Base64 Is Encoding, Not Encryption: When to Use It

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.

7 min readEncodingPitfalls
Guarding API Input with JSON Schema

Unvalidated input is where bugs and injection enter. What JSON Schema can and cannot do, plus where in the stack to apply it.

6 min readJSONAPIBeginner
Choosing Image Formats: JPEG / PNG / WebP / AVIF and Compression

Photos, screenshots, icons and animations each want a different format. Lossy vs lossless, transparency, animation, and where to set quality.

6 min readImagesPitfalls
Why Two Identical-Looking Strings Differ: Unicode Normalization

The same character has several representations, so naive comparison fails. NFC, NFD and NFKC explained, plus correct storage, comparison and hashing.

6 min readUnicodePitfalls

Related tools

Other topics