Base64 Encoder and Decoder
Encode text, images and files to Base64 and back, all on one page.
Your files are processed on your device and are never uploaded.
This Base64 encoder and decoder puts the three everyday jobs on one page. Switch between the tabs to encode or decode text, turn a file into Base64, or turn Base64 back into a file – without opening a different tool for each.
The Three Tabs
- Text: Type or paste text or Base64 into the Input box and press Encode or Decode. Tick URL-safe to use
-and_instead of+and/. - File → Base64: Choose any file up to about 50 MB. You get the Base64, with or without the data URI prefix, and can copy it, download it as .txt or copy it as an <img> tag for images.
- Base64 → File: Paste a Base64 string or data URI and click Decode to file. The file type is detected from its content, previewed when possible and offered for download.
How to Use It
- Pick a tab for what you want to do.
- Add your input: text, a file or a Base64 string.
- Run it: press Encode, Decode or Decode to file.
- Copy or download the result.
What Base64 Is For
Base64 rewrites binary data using 64 plain characters – A–Z, a–z, 0–9, + and /. That lets files and special characters travel through systems built for text: JSON and XML, email, HTML and CSS, URLs and config files. The cost is size – the encoded text is about a third larger than the original.
Handy Details
- UTF-8 text: Accents, emoji and every language encode and decode correctly.
- Type detection: When decoding a file, the tool reads the first bytes to tell you whether it is a PNG, JPG, PDF, ZIP, MP3 and so on.
- Clear errors: If text is not valid Base64, you are told so instead of getting garbage.
Need a Specialised Tool?
For more options, use the dedicated pages: Text to Base64 encodes as you type, Base64 to Text repairs damaged strings automatically, File to Base64 writes HTML and CSS snippets, and Base64 Validator explains exactly what is wrong with a string.
Everything runs in your browser. Text and files are never uploaded.
Text to Base64 Base64 to Text File to Base64 Base64 to File Validator & Repair