Encode and decode Base64.
Text with accents and emoji, URL-safe Base64, or a whole file to a data URI. And back.
Loading…
Next step: URL encoder and decoder →
Three steps.
Choose Text or File, then Encode or Decode.
Type, paste, or drop a file. The result appears at once.
Copy it, copy the data URI, or download the decoded file.
What Base64 is for
Base64 writes any data using 64 safe characters, so binary content can travel where only text is allowed: email attachments, JSON fields, HTTP headers, or a small image embedded in CSS as a data: URI. It is an encoding, not encryption: anyone can decode it.
Accents and emoji
The browser's built-in btoa fails on characters outside Latin-1. This tool converts text to UTF-8 bytes first, so perché ☕ encodes and decodes correctly, matching what servers and other languages produce.
URL-safe Base64
The URL-safe variant (base64url) replaces + and / with - and _ and drops the = padding. It is used in JWT tokens and in links. The decoder accepts both forms, with or without padding and line breaks.
Files
Base64 makes data about a third larger. Inlining a small icon saves a request; inlining a photo of several MB slows the page. When you decode Base64 that is really a file, the tool recognises PNG, JPEG, PDF, ZIP and other types from their first bytes and offers it as a download.
Questions.
Is Base64 secure?
No. It hides nothing: anyone can decode it in a second. Never use it to protect passwords or personal data.
Why is my decoded text full of strange symbols?
The data is probably a file, not text, or was encoded from a different charset. If it is a known file type, you will see a download button.
Is my file uploaded?
No. The file is read by your browser and converted on your device.