Developer

Base64 Encoder and Decoder for Text and Files

Encode text or files to Base64, or decode Base64 back to text, with an optional URL-safe mode, all in your browser.

Runs locally in your browser
Output

—

Text and files are transformed locally with browser APIs; this tool performs no upload.

What it does

Base64 Encoder / Decoder turns text into Base64 and back again using your browser's own encoding APIs, with an optional URL-safe mode that swaps the characters that break in URLs and filenames. A separate file box converts a whole file to a Base64 string you can copy. It suits developers embedding small assets or debugging encoded payloads without sending anything to a server.

How to use it

  1. Choose Encode text or Decode text, and turn on URL-safe if you need it.
  2. Type or paste your text, or choose a file in the Encode a file box to convert it.
  3. Copy the text result with the Copy button under the output, or a file's result with Copy file Base64.

Example

Input
Hello, world!
Output
SGVsbG8sIHdvcmxkIQ==

What happens to your file

  • Your file or text is processed by code running in this browser tab. It is not uploaded to any server.
  • The processing code is downloaded from this site with the page; nothing about your input is sent back.
  • The result is created on your device and saved only when you choose to download it.

Limits

  • File conversion is one-way: files are encoded to Base64, but Base64 text cannot be converted back into a downloadable file here.
  • Decoding expects valid Base64 (standard or URL-safe); malformed input produces an error message rather than partial output.
  • Large files are limited by your device's available memory since the whole file is loaded before encoding.

Questions

Can I decode a Base64-encoded file back to its original file?

No. The file box only encodes a file to Base64 text; there is no matching option to turn a Base64 string back into a downloadable file.

What does URL-safe mode change?

It replaces + with - and / with _, and removes trailing = padding, which is the variant commonly used inside URLs, filenames and tokens.

What happens if I try to decode text that is not valid Base64?

If the text contains characters that are not Base64, the tool shows 'Invalid Base64 input.' Valid Base64 that decodes to binary data rather than UTF-8 text is shown with replacement characters.

Is there a file size limit?

There is no fixed limit in the tool itself; a file is read entirely into memory before conversion, so very large files are limited by your device and browser.

Next steps