+ and / for - and _ and drops the padding.Base64 is a way of writing any data — text, an image, a PDF — using only 64 safe, printable characters (A–Z, a–z, 0–9, and a couple of symbols). It exists because a lot of systems were built to carry plain text, not raw binary: email attachments, data URIs in web pages, JSON and XML payloads, tokens, and cookies all rely on Base64 to move binary data through text-only channels without it getting corrupted. Encoding makes data about a third larger, but guaranteed to survive the trip.
This tool does both directions for both text and files. On the text side it's UTF-8 aware, so accented letters, non-Latin scripts, and emoji encode and decode correctly instead of turning into garbage. The URL-safe option produces the variant used in JWTs and web links. On the file side, dropping in an image gives you a data: URI you can paste straight into a stylesheet or an <img> tag to embed the picture with no separate file — handy for small icons and email signatures.
One important note: Base64 is encoding, not encryption. It scrambles nothing and protects nothing — anyone can decode it back in a second, exactly as this tool does. It's for transport and compatibility, never for hiding secrets. If you need to keep data private, that calls for real encryption, not Base64. What this tool does guarantee is that your data stays on your device: every conversion runs in your browser with no server call, so you can safely encode files or strings that contain private information without any of it being uploaded.
No. Base64 is an encoding, not encryption — it provides no security whatsoever. Anyone can decode a Base64 string instantly back to the original, with no key or password. It exists purely to move data safely through text-based systems. Never use it to hide passwords or sensitive data; for that you need genuine encryption.
No. All encoding and decoding happen in your browser using built-in JavaScript. Files you drop are read locally and never leave your device — there is no upload in this tool. That makes it safe to encode files or strings containing private information; nothing is transmitted or stored.
A data URI is a string that starts with something like data:image/png;base64, followed by the Base64 of a file. It lets you embed an image or file directly inside HTML, CSS, or JSON instead of linking to a separate file — useful for small icons, email signatures, or bundling an asset into a single document. Toggle the "data: URI prefix" option to include or omit it.
Standard Base64 uses the characters + and /, which have special meanings in web addresses and can break things. URL-safe Base64 replaces them with - and _ and usually drops the trailing = padding, so the string can be dropped straight into a URL, filename, or a JSON Web Token (JWT) without being mangled.
Usually the input isn't valid Base64 — a stray space, a missing character, or it was URL-safe Base64 decoded as standard (or vice versa). Make sure the whole string is present and untruncated, and match the URL-safe setting to how it was encoded. This tool tolerates URL-safe input automatically, but broken or partial strings can't be recovered.