Base64 encode and decode
Type or paste text to encode it, or paste Base64 to decode it. Files and images can be turned into Base64 or a data URL, and decoded Base64 can be saved as a file.
- Text, files, URL-safe
- Free, no sign-up
Files
Runs in your browser. Nothing you type or open is uploaded. Free to use, no account. More developer tools
How to use it
- Choose encode or decode.
- Paste the text or Base64. The result updates as you type.
- Use the Files section to encode a file or save decoded Base64 as a file.
Standard and URL-safe Base64
Base64 turns bytes into letters, digits, + and /, padded with =. URL-safe Base64 uses - and _ instead and usually drops the padding, so the value can sit in a link or a JSON Web Token. Text is handled as UTF-8, so Hindi, emoji and accented letters round-trip correctly.
When you decode Base64 that holds an image, a PDF or a ZIP, the page recognises the file type from its first bytes, shows a preview for images and saves it with the right extension. A data URL wraps the Base64 with its type, ready for HTML or CSS.
Private by design
Privacy
Everything runs in this page and stays on your device. Text and files are encoded inside this page.
This page also shows Google ads, which can use cookies. Privacy and cookies explains how.
Questions
What is Base64 used for?
It carries binary data, such as an image or a key, through systems that expect text: email attachments, JSON, data URLs and tokens.
What is URL-safe Base64?
A variant that uses - and _ instead of + and /, usually without = padding, so it is safe in links and file names. JWTs use it.
Is Base64 encryption?
Base64 is an encoding. Anyone can decode it, so use real encryption for secrets.
Why does my decoded text look garbled?
The data may be a file rather than text, or text in another encoding. Try Save decoded Base64 as a file to see what it is.