Base64 Encoder & Decoder
Convert text to Base64 and back, turn any file or image into Base64 or a data URL, or rebuild the original file from a Base64 string.
- Choose text, file or Base64 → file
- Paste text or choose a file
- Copy or download the result
Your files never leave your device
What Base64 is and where it appears
Base64 writes binary data using only 64 safe text characters, so it can travel through places that handle text only. You meet it in email attachments, JSON and XML payloads, authentication headers and data URLs that embed small images in HTML or CSS. It is an encoding, not encryption.
- Use the Text tab to encode any text as UTF-8 Base64 or decode a string back to readable text.
- Use the File tab to turn a file or image into Base64, optionally with the data URL prefix.
- Use the Base64 to file tab to paste a string and download the original file, with its type detected.
A worked example
Type the word Hello in the Text tab and press Encode. The result is SGVsbG8=, where the equals sign is padding. Paste that string back and press Decode to get Hello again.
The size difference is predictable: every 3 bytes of input become 4 characters of output, so Base64 is about 33% larger than the original. A 300 KB image therefore becomes roughly 400 KB of text.
Limits and common mistakes
Anyone can decode Base64, so never use it to hide passwords or private data. Use URL-safe mode when the string will sit inside a link or file name, because it replaces + and / with - and _ and drops the padding.
Spaces and line breaks in pasted Base64 are ignored. If you see the message that the input is not valid Base64, check for a missing character or a stray prefix. If the content is binary rather than text, use the Base64 to file tab.
Frequently asked questions
What is Base64?
A way of writing binary data with 64 safe text characters, used in emails, JSON, data URLs and APIs. It is an encoding, not encryption, so anyone can reverse it.
Does it support Arabic, emoji and other languages?
Yes. Text is encoded as UTF-8, so any language and any emoji decode back exactly as you typed them.
What is URL-safe Base64?
A variant that uses - and _ instead of + and / and drops the = padding. The result can be placed in links and file names without further escaping.
What is a data URL?
It is Base64 with a prefix such as data:image/png;base64, that lets you embed an image or file directly in HTML or CSS. Tick the data URL option when encoding a file to get it ready to paste.
How do I turn Base64 back into a file?
Open the Base64 to file tab and paste the string. The file type is detected automatically, images are previewed, and you can download the file.
Are my files uploaded?
No. Encoding and decoding happen on your device only, and nothing you paste is sent anywhere.