Base64 Encoder and Decoder
Encode text or any file to Base64, or decode Base64 back into readable text or a downloadable file. Unicode text is handled as UTF-8, URL-safe Base64 is supported, and files can be turned into ready-to-use data URLs for CSS and HTML.
The interactive tool loads here when JavaScript is enabled. Files are processed locally in your browser.
How to use Base64 Encoder and Decoder
- Choose Encode or Decode.
- Type text, paste Base64 or choose a file.
- Toggle URL-safe output or data URL format if needed.
- Copy the result or download the decoded file.
Features
- UTF-8 safe: emoji and non-Latin scripts encode and decode correctly.
- URL-safe alphabet (- and _) without padding for tokens and URLs.
- Data URL output with the file's MIME type for embedding images.
- Decoding accepts data URLs, line-wrapped input and missing padding.
Supported formats and limitations
Input: text or any file. Output: Base64 text, a data URL, decoded text, or a decoded file download.
- Base64 is an encoding, not encryption.
- Encoded output is about 33% larger than the original.
Frequently asked questions
Is Base64 encryption?
No. Base64 is a reversible encoding that anyone can decode. Never use it to protect passwords or secrets.
Why is Base64 larger than the original?
Base64 represents every 3 bytes with 4 characters, so encoded data is about 33% larger.
What is URL-safe Base64?
It replaces + and / with - and _ and usually drops = padding, so the result can be used in URLs and filenames.