How it works
Choose Text or File mode
Encode/decode plain text, or encode a whole file to Base64 and decode it back.
Paste or upload your input
Text mode works as you type; File mode reads the file locally.
Copy or download the result
Copy encoded/decoded text directly, or download a decoded file.
Base64 Encoder/Decoder converts between plain text (or files) and their Base64 representation. Text mode handles the common copy-paste case — encoding UTF-8 text to Base64 or decoding Base64 back to text, with an optional URL-safe variant for use in JWTs, query strings, or filenames. File mode handles arbitrary binary files: choose any file to see its Base64 output (optionally wrapped as a ready-to-use data: URI for embedding directly in HTML or CSS), or paste a Base64 string to decode and download it as a file.
Everything runs locally using the browser's native Base64 primitives — no file or text you enter is ever uploaded or sent to a server.
Base64 exists because a lot of systems and formats — email (MIME), JSON, URLs, older text protocols — were built to safely carry text but not arbitrary binary bytes. Encoding binary data as Base64 maps every 3 bytes of input to 4 printable ASCII characters drawn from a fixed 64-character alphabet (A–Z, a–z, 0–9, plus two more symbols), which is why encoded output is always roughly 33% larger than the original — that overhead is the cost of making arbitrary bytes safely representable as plain text. This is also why Base64 is encoding, not encryption: it's fully and trivially reversible by design, and should never be relied on to keep data confidential or secure.
The standard and URL-safe variants exist because Base64's default alphabet includes + and /, both of which already mean something specific inside a URL (a space, and a path separator, respectively). The URL-safe variant substitutes - and _ for those two characters and typically drops the = padding at the end, so the result can be dropped straight into a URL path, query parameter, or filename without needing any additional escaping — which is exactly why URL-safe Base64 is the encoding JWTs use for each of their three dot-separated segments.