←
Developer

Base64 Encode & Decode

Loading the tool…

Ready when you are.Runs in this browser · nothing is uploaded

Encode and decode Base64 text or files

  • Free
  • No sign-up
  • No upload
  • Works offline

Tool facts

Opens
Any file
Saves as
TXTAny file
Price
Free, no sign-up, no watermark
Are files uploaded?
No. Everything is processed in this browser, on your device.
Batch processing
One file at a time
Offline use
Works without a connection once this page has loaded
Browser
A recent Chrome, Edge, Firefox or Safari, on computer or phone.
Limits
Files up to 20 MB.

Check it yourself: press F12, open the Network tab, then use the tool. No request carries your data.

About Base64 Encode & Decode

This Base64 tool encodes text or a file into Base64 and decodes Base64 back into readable text, updating the result as you type. Text is converted to UTF-8 bytes before encoding, so accented letters, Chinese, Japanese, Arabic and emoji round-trip correctly instead of failing with the classic btoa() "character out of range" error. Auto mode looks at your input and decides for you: valid Base64 that decodes to readable text or to a recognisable file is decoded, anything else is encoded.

Turn on URL-safe to get Base64URL as defined in RFC 4648 section 5, which uses - and _ instead of + and / and drops the = padding, the form used in JWTs and URL parameters. The decoder accepts both alphabets, missing padding, line breaks and data: URIs. You can also drop any file up to 20 MB to get its Base64 or a data URI, and if decoded data turns out to be binary (an image, PDF or ZIP), you can download it as a file. Nothing is uploaded: the conversion runs locally in your browser.

Base64 Encode & Decode runs entirely in your browser. Your data is processed on your device and is never uploaded to Qiyi or anyone else.

How to use Base64 Encode & Decode

  1. Type or paste text into the Input box, or drop a file onto the file area to encode its bytes.
  2. Leave Direction on Auto, or choose Encode or Decode explicitly.
  3. Optionally turn on URL-safe (Base64URL), pick a Line wrap of 64 or 76 characters, or enable Data URI for files.
  4. Read the result in the Output box, then click Copy or Download. For binary data, click Download decoded file.

Frequently asked questions

Does it handle Unicode and emoji?

Yes. Text is encoded as UTF-8 before it is converted to Base64, and decoded bytes are read back as UTF-8. That is the same result you get from base64 on the Linux command line or Buffer.from(text).toString('base64') in Node.js.

What is the difference between Base64 and Base64URL?

Standard Base64 uses the characters A–Z, a–z, 0–9, + and / with = padding. Base64URL (RFC 4648 §5) replaces + with - and / with _ and usually omits the padding, so the result can be used in URLs, file names and JWTs without escaping. This tool can produce either and decodes both.

Why does Base64 make my data bigger?

Base64 represents every 3 bytes as 4 ASCII characters, so the output is about 33% larger than the input, plus line breaks if you wrap lines. It is an encoding for safely moving binary data through text-only channels, not compression and not encryption.

Why do I get "not valid Base64" when decoding?

The input contains characters outside the Base64 alphabet (for example quotes, spaces in the middle of a URL or a % sign from URL encoding), or its length is impossible for Base64. Remove surrounding text, URL-decode it first if it contains %2B or %3D, and try again. Line breaks and missing = padding are accepted.

Are my text and files uploaded anywhere?

No. Encoding and decoding use your browser's built-in functions, and files are read locally with the File API. The page works offline once it has loaded.

· Free · Runs in this browser · nothing is uploaded

Drop any file here
Drop it to see which tools can open it