# Base64 decode and encode

Decode base64 to text, or encode text to base64. Handles UTF-8, emoji, URL-safe input and data URLs. Nothing you paste is sent anywhere.

Canonical page: https://filetity.com/base64-decode

## Capabilities

- Free: Yes, with no watermark and no page limit.
- Account required: No. There is no account system.
- Processed on device: Yes. The file is read by your browser and never uploaded. There is no server to send it to.
- Formats: Text in either direction. Accepts line breaks, missing padding, the URL-safe alphabet, and a data: URL prefix. Output can be copied or downloaded as .txt.
- Limits: Bounded by what your browser will hold in a text box, which in practice is several megabytes. Base64 that decodes to a file rather than text is offered as a download instead.
- Mobile: Yes, on any modern mobile browser. Large files are limited by the memory the phone gives the browser.
- Offline: Yes, after you have used it once. Your browser keeps what the tool needs, so it then works with no network connection.

## Questions

### Why does my accented or non-English text come back wrong elsewhere?

Because most quick base64 tools, and the browser's own atob and btoa, work on latin1 rather than UTF-8. Anything outside the first 256 characters gets mangled, and emoji break outright. This tool encodes and decodes through UTF-8, so text goes in and comes back identical.

### Can I paste a whole data: URL?

Yes. A prefix like data:image/png;base64, is stripped before decoding, so you can paste what you copied out of CSS or HTML without trimming it first.

### What if it decodes to a file rather than text?

You get told, and offered the bytes as a download. Showing them as text would produce a screen of replacement characters that looks like a broken decode, so the tool checks whether the result is valid UTF-8 before claiming it is text.

### Is base64 encryption?

No, and it is worth being clear about. Base64 is an encoding, not a cipher. Anyone can decode it in one step, exactly as you are doing here. It hides nothing.

### What does a remainder of one mean in the error?

That a character went missing. Base64 turns every three bytes into four characters, so a valid string's length, with padding removed, is never one more than a multiple of four. The tool says how long yours is; check the start and end of what you copied.

## Related tools

- [Base64 to Image](https://filetity.com/base64-to-image): Paste base64 or a data URL and get the picture back.
- [URL Decoder and Encoder](https://filetity.com/url-decoder): Turn %20 and %C3%A9 back into readable text, or encode text for a URL.
