Guides
Everything that tends to go wrong when you move an image through Base64 — and how to fix it.
-
Base64 Image Not Showing: How to Find the Real Cause
2026-09-17 · 1081 words
Six checks, cheapest first, that separate a bad string from a bad prefix from bytes that were never an image. Includes the two causes almost nobody checks.
-
Base64 Line Breaks and Padding: Why They Break Decoders
2026-09-17 · 1036 words
MIME wraps Base64 at 76 characters and padding rounds it to a multiple of four. What both rules are for, and how to handle strings that break them.
-
Base64 Overhead: Why Data URIs Make Files 33% Bigger
2026-09-17 · 1040 words
The 4-for-3 arithmetic behind Base64, why gzip cannot recover it for images, and where the break-even point for inlining an asset actually sits.
-
Base64 vs Hex, Base32 and ASCII85: Encodings Compared
2026-09-17 · 1148 words
Four ways to turn bytes into text, with different alphabets, different overhead and different failure modes. Which one belongs in which situation.
-
Data URI vs Blob URL: Which Should You Use for Images?
2026-09-17 · 1122 words
Both display an image without a server. One costs 33% extra bytes and is portable; the other is nearly free and dies with the page. How to choose.
-
Decode a Base64 Image in Python, Node.js and the Browser
2026-09-17 · 955 words
The same string can decode cleanly in one runtime and fail in another. What each does with padding, newlines and junk — plus how to verify the bytes.
-
Image File Signatures: PNG, JPEG, WebP, AVIF and More
2026-09-17 · 993 words
Extensions and declared MIME types both lie; the first bytes never do. The signature table a decoder uses, and how to read it in JavaScript.
-
How to Convert an Image to Base64 in JavaScript (3 Ways)
2026-09-17 · 1005 words
FileReader, canvas and raw ArrayBuffer each produce a different string — and one of them silently re-encodes your image. Working code for all three.
-
URL-Safe Base64 vs Standard Base64: A Practical Guide
2026-09-17 · 995 words
JWT, cookies and query parameters use a different alphabet: - and _ instead of + and /. What changes, what breaks, and how to tell which one you have.
-
What Is a Base64 Data URI — and Why Some Images Won't Decode
2026-09-17 · 1244 words
A data URI is an image stored inside a URL. Here is what the format actually allows, and the three different bugs that all look like "it won't decode".