Skip to tool
ZirkoMirkoTools

Base64 Decoder

Decode a Base64 string to text, or encode text and files to Base64, in your browser.

Paste text or Base64, or choose a file to encode.

Example · Decode Hello

URL-safe uses - and _ for + and /.

Result

Hello

5 bytes decoded from Base64.

Next tool · Convert a URL parameter

Processed on this device — nothing is uploaded

What you can do here

  • Standard and URL-safe Base64
  • UTF-8 text and file conversion
  • Decoded raster image previews
  • Copy or download results

How do you decode Base64 to text or a file?

Paste a Base64 string with Decode selected to recover its original bytes. If those bytes make readable UTF-8 text, you can copy the result. You can also download the bytes directly and preview common raster images such as PNG and JPEG. Select URL-safe for strings that use hyphens and underscores.

Paste a Base64 string with Decode selected to recover its original bytes. For example, SGVsbG8= decodes to the five bytes of "Hello". Readable UTF-8 text can be copied, any bytes can be downloaded, and common images such as PNG and JPEG show a preview. Choose URL-safe for strings that use hyphens and underscores. To go the other way, switch to Encode and paste text or pick a file of up to 5 MiB.

Key facts

Price
Free
Sign-up
None
Upload
None — runs on your device
Limits
8 MiB pasted UTF-8 text · 5 MiB per selected file
Works with
UTF-8 text · Standard or URL-safe Base64 · Local files
Output
Base64 text · Decoded UTF-8 text or downloaded bytes · Supported raster image previews
Updated

How do you decode or encode Base64?

  1. Pick a conversion

    Choose Decode, Encode text, or Encode file.

  2. Provide the input

    Paste Base64 or text, or choose a file up to 5 MiB.

  3. Take the result

    Copy the output text, or download the result as a file.

How Base64 represents bytes

Base64 groups three bytes into four symbols. Standard Base64 uses + and /, with = padding as needed. Base64url uses - and _ instead. The URL-safe encoder leaves off padding, and the decoder accepts it either way.

Input bytesStandardURL-safe
Hello (UTF-8)SGVsbG8=SGVsbG8
😀 (UTF-8)8J+YgA==8J-YgA

Frequently asked questions

How can I tell if a string uses URL-safe Base64?

Look for a hyphen or underscore where standard Base64 has a plus sign or slash. Choose URL-safe for those. A string without any of those four characters may decode in either mode.

Can I recover a PDF or other binary file?

Yes. Download saves the recovered bytes. If the format is not recognised the file gets a .bin extension, which you can rename if you know the original type.

Why does a Base64 string fail to decode?

Check that you copied the whole string and picked the right alphabet. Standard Base64 uses + and /, URL-safe uses - and _. Whitespace and line breaks inside the string are accepted.

Why is Base64 about a third larger than the original?

It writes every 3 bytes as 4 characters. A 3,000-byte file becomes about 4,000 characters, plus any = padding at the end.

Is Base64 a form of encryption?

No. Anyone can decode it. It only makes binary data safe to carry as text, so never use it to hide a password.

Does decoding or encoding upload my input?

No. Your text and files are processed in the browser and the download is created locally.

Popular conversions

Related tools

About this tool

Made by ZirkoMirko. Last updated .

Check it yourself in your browser’s Network panel while using the tool. How we handle your data.

Sources