Base64 decode and encode online

Switch between Decode and Encode to turn Base64 back into readable text, or to convert text or a file into Base64. The tool is UTF-8 safe and offers a URL-safe option, all in your browser.

  • Free
  • No sign-up
  • Runs in your browser

Runs in your browser — your text is never sent to our servers.

How to use Base64 Encode/Decode

  1. Choose "Decode" to base64 decode a string back to text, or "Encode" to convert text to Base64.
  2. Paste your text in the box. For encoding you can also pick a file.
  3. Turn on "URL-safe" if the result must be used inside a URL or a filename.
  4. Read the result, which updates automatically, then copy it.

Features

  • Encode and decode in one tool, switching modes with one click
  • UTF-8 safe, so accented letters and non-English characters survive the round trip
  • Optional URL-safe alphabet that replaces + and / with - and _
  • Encode a file to a Base64 string
  • Clear error message when the input is not valid Base64
  • Handles up to about 10 million characters
  • Result updates as you type
  • No daily limit

Supported formats and limits

  • Maximum input: 10,000,000 characters

Examples

InputResult
Hello, world!Encode - SGVsbG8sIHdvcmxkIQ==
T25lVml4YQ==Decode - OneVixa
Hola mundoEncode - SG9sYSBtdW5kbw==
subjects?Standard - c3ViamVjdHM/ - URL-safe - c3ViamVjdHM_ — URL-safe swaps the / for an underscore.

Limitations

  • Decoding fails with an error if the text is not valid Base64, for example if it contains characters outside A-Z, a-z, 0-9, + and / (or - and _ in URL-safe mode).
  • Decoding binary data, such as an image, as text shows an error. Use file encoding for files.
  • Base64 is an encoding, not encryption. Anyone can decode it, so never use it to protect secrets.
  • Encoded output is about one third larger than the original data.

Learn more

Base64 is a way to write binary data using only 64 safe text characters: A-Z, a-z, 0-9, plus and slash, with equals signs as padding. It was created so data such as images or attachments can travel through systems built for plain text, like email (MIME), JSON and HTML data URIs. The format is defined in RFC 4648.

It works by taking three bytes (24 bits) and splitting them into four groups of six bits, each mapped to one character. That is why the output is about 33 percent larger, and why the string ends with one or two equals signs when the input length is not a multiple of three.

The URL-safe variant exists because plus and slash have special meaning in URLs. It swaps them for minus and underscore, and is used in tokens such as JSON Web Tokens. Remember that Base64 is not a security measure. It hides nothing, so treat an encoded password or key exactly like the original. When you decode text that contains non-English characters, the bytes must be interpreted as UTF-8, which this tool does by default.

Frequently asked questions

How do I decode Base64 to text?

Choose Decode, paste the Base64 string and read the text. If the string is not valid Base64, the tool shows an error.

How do I encode text to Base64?

Choose Encode and type or paste your text. The Base64 version appears right away and can be copied.

What is URL-safe Base64?

It replaces + with - and / with _ so the string can sit in a URL or filename without percent-encoding. Turn it on if the receiving system expects that alphabet.

Can I encode a file to Base64?

Yes, choose a file in Encode mode and you get its Base64 string, for example for embedding an image in a data URI.

Is Base64 encryption?

No. It only changes how data is written, and anyone can reverse it. Use real encryption for sensitive data.

Do accented characters work?

Yes. Text is converted as UTF-8, so characters like é, ñ and emoji decode correctly.

Sources

Last reviewed: September 29, 2026