Base64 and Base64url Encoding
JSON cannot carry raw binary; Base64 is how file bytes appear in API responses, data URLs, PEM blocks, and JWT segments. Know the difference between standard Base64 and Base64url.
What It Defines
Defines Base64 and Base64url alphabets for encoding arbitrary binary data as ASCII text. Base64url (URL-safe, no padding) is used in JWTs, JWK thumbprints, and many JSON API envelopes that embed binary payloads. Adds ~33% size overhead — encoding, not encryption.
Canonical (Normative)
Convenient (Practical)
The canonical publication point for finalized RFCs. If a protocol is standardized as an RFC, the RFC Editor text is the normative final reference. Published by the IETF, IRTF, IAB, and independent stream.
Related Specs
Every upload, download, attachment, and asset pipeline crosses these layers. Misunderstanding header vs envelope causes MIME spoofing bugs, parser differentials, and broken file validation. Start here before diving into individual format specs.
JWTs are the token format for OIDC ID tokens and many OAuth implementations. Understanding the structure and security tradeoffs is essential.
PEM is how keys and certificates appear in `.pem` files, environment variables, and Kubernetes secrets. The BEGIN/END lines are the envelope; the Base64 block is the payload.