Base64 encoder
Encode plain text or any file to Base64, or decode a Base64 string back to text or download it as a file. URL-safe Base64 and data: URL prefixes are supported.
No uploads · Everything runs in this browser
FAQ
Are files uploaded?
No. Files are read and converted inside this browser and never leave your device.
What is URL-safe Base64?
It replaces + and / with - and _ and drops the trailing = padding, so the result can be used in URLs and JWTs without escaping. Decoding accepts both forms.
What file types can I encode to Base64?
Any file type up to 20 MB — images, PDFs, fonts, binaries and so on. The encoded output is always plain ASCII text.
What does the data: URL option do?
It prepends a data URI prefix such as data:image/png;base64, so the result can be used directly in HTML img src or CSS url() without a separate file.
Why does decoding give a binary file instead of text?
The original data was not text — it was a binary file such as an image or PDF encoded in Base64. The tool detects this and offers a download link instead of showing garbled characters.