Base64 encodes binary data using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). Every 3 bytes of input become 4 Base64 characters. Used wherever binary data needs to travel through text-only channels — email attachments, JWTs, data URIs, HTTP Basic auth headers.
Standard Base64 uses + and /, which have special meaning in URLs and must be percent-encoded. URL-safe Base64 replaces them with - and _, and omits the = padding. Used in JWTs, OAuth tokens, and any Base64 embedded in a URL.
Decoding a JWT payload — the middle section (between the dots) is Base64url-encoded JSON. Encoding images as data: URIs. Passing binary config in environment variables. HTTP Basic auth is Base64(username:password) — never send this over plain HTTP.