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.

Base64 Encoder and Decoder with ShrinkBee

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

  1. Pick a tab for what you want to do.
  2. Add your input: text, a file or a Base64 string.
  3. Run it: press Encode, Decode or Decode to file.
  4. 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

Frequently Asked Questions

How do I decode Base64 text?
Open the Text tab, paste the Base64 into the Input box and press Decode. The readable text appears in the Output box.
How do I convert a file to Base64?
Open the File → Base64 tab and choose your file. Untick Include data URI prefix if you only want the plain string.
How do I turn Base64 back into a file?
Open the Base64 → File tab, paste the string or data URI and click Decode to file. The tool detects the file type and lets you download it.
What does "Not valid Base64 text" mean?
The input contains characters outside the Base64 alphabet, or it decodes to binary data rather than text. For files, use the Base64 → File tab. To find the exact problem, try the Base64 Validator.
Is there a file size limit?
Files up to about 50 MB can be encoded on this page. File to Base64 accepts up to 100 MB.
Is Base64 Encode / Decode free to use?
Yes. Base64 Encode / Decode is completely free, with no sign-up, no watermark and no limit on how many times you use it.
Are my files uploaded to a server?
No. Your files are processed directly in your web browser on your own device. Nothing is uploaded or stored, and the file is gone from memory when you close the tab.

More Base64 Tools

Made With ♥ By ShrinkBee