Skip to content

Base64

Medium — good to knowGeneral Dev

ELI5 — The Vibe Check

Base64 is like translating a photo into text by converting it to a long string of letters and numbers. The photo is still all there — it's just disguised as text so it can travel safely through systems that only like text, like email or URLs.

Real Talk

Base64 is an encoding scheme that represents binary data using 64 printable ASCII characters. It inflates the data size by ~33% but makes binary safe to transport through text-only channels like HTTP headers, JSON payloads, or email.

Show Me The Code

// Node.js
const encoded = Buffer.from("Hello World").toString("base64");
console.log(encoded); // "SGVsbG8gV29ybGQ="

const decoded = Buffer.from(encoded, "base64").toString("utf-8");
console.log(decoded); // "Hello World"

When You'll Hear This

"The image is stored as a Base64 string in the JSON payload." / "JWT tokens use Base64 encoding for the header and payload."

Made with passive-aggressive love by manoga.digital. Powered by Claude.