Base64 Encoding Guide
Complete guide to Base64 encoding, decoding, and best practices for developers.
Text · Image · File — URL-safe mode · auto-detect · live image preview — 100% browser-side
Paste text → get Base64
Real-time · No button click · 200ms debounce
Base64 encoding converts binary data into a string of 64 safe ASCII characters — A–Z, a–z, 0–9, +, and /. It is the standard way to embed binary content (images, files, certificates) inside JSON, XML, HTML, and email without breaking the format. The encoded output is ~33% larger than the original.
Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 (Base64URL) replaces +→- and /→_ and removes = padding. Use URL-safe mode for JWT tokens, OAuth tokens, and URL query parameters.
Base64 is a binary-to-text encoding that converts binary data into 64 safe ASCII characters (A–Z, a–z, 0–9, +, /). It is used to transport binary data (images, files) over text-only channels like JSON APIs, email, and HTML. It increases size by ~33%.
URL-safe Base64 (Base64URL) replaces + with -, / with _, and removes = padding. Use it for JWT tokens, URL query params, and filenames. This tool's URL-safe toggle does this automatically. Decoding works the same way on both variants.
No. Base64 is encoding, not encryption. Anyone can decode a Base64 string without a key. Never use it to hide sensitive data. For security, use AES encryption or proper hashing (SHA-256, bcrypt).
Switch to the Image tab, upload any JPG, PNG, GIF, or WebP (max 5 MB). The data URI appears instantly. Copy it for use in HTML src, CSS background-image, or JSON API payloads. Your image never leaves your browser.
Set Direction to Decode. Paste a Base64 string — the tool auto-detects the file type from magic bytes (JPEG, PNG, PDF, ZIP) and shows a Download button with the correct extension. For images it also shows a live preview.
Base64 uses A-Z, a-z, 0-9, + and / with = padding. Example: "SGVsbG8gV29ybGQ=" decodes to "Hello World". Image data URIs look like: data:image/png;base64,iVBORw0KGgo... — everything after the comma is Base64.