Base64 Encoder & Decoder
Encode and decode Base64 for text, images, and files right in your browser. Supports data URLs, URL-safe Base64 (base64url), instant preview, copy, and download.
Convert text or files to Base64 and back. Encode UTF-8 strings, generate data URLs for images, decode Base64 into a downloadable file, and switch between standard and URL-safe variants — all processed locally.
About the Base64 Encoder & Decoder
Base64 turns arbitrary bytes into an ASCII-safe string so they can travel through text-only channels like JSON, URLs, HTTP headers, and email. This tool handles both directions — encode UTF-8 text or binary files, decode Base64 back into readable text or a downloadable file, and generate data URLs for images. Everything happens locally in your browser, so credentials, private files, and internal tokens never leave your device.
Common use cases
- Building Authorization: Basic headers for API testing. - Embedding small images or fonts directly into HTML, CSS, or emails via data URLs. - Debugging JWTs by decoding the URL-safe Base64 header and payload segments. - Encoding webhook payloads, TLS certificates, or attachments for JSON transport. - Reconstructing a file when you only have the Base64 blob from a database or log. - Comparing what a backend produced with what your client sees on the wire.
Tips for great results
- Toggle URL-safe when the value goes into a URL, cookie, or JWT — otherwise + and / will be percent-encoded. - Copy the full data:mime;base64,... prefix when embedding images so browsers render them directly. - If a paste has line breaks (PEM certificates, email MIME bodies), the decoder strips whitespace automatically. - To reverse a result, hit Swap — it moves the output into the input and flips the mode. - For binary files, use the Image / File tab instead of the text tab, otherwise the decoded bytes will be mangled by UTF-8 handling.
Limitations
- File uploads are capped at 10 MB to keep the browser responsive. - The text tab assumes UTF-8. Decoding non-text bytes there may show replacement characters — use the File tab instead. - The tool does not sign or verify JWTs; it only encodes/decodes their Base64 segments. - Password-protected or encrypted files remain encrypted after decoding — Base64 is an encoding, not encryption.
Key features
Convert UTF-8 text to Base64 and back with a live preview as you type.
Drop an image and get a ready-to-paste data URL plus a preview.
Encode any file — PDFs, fonts, audio, binaries — and copy the result to your clipboard.
Paste a data URL or raw Base64, choose a MIME type, and download the reconstructed file.
Toggle between standard Base64 and URL-safe base64url for URLs and JWTs.
Move the output back to the input to reverse the operation instantly.
Bad padding or invalid characters are caught before decoding, with a clear message.
Encoding and decoding happen locally — nothing is uploaded or logged.