Use this free Base64 encoder and decoder to convert text to Base64 or turn Base64 back into readable text. Choose Encode or Decode, paste your input, pick the standard or URL-safe variant, and click Convert. The tool handles Unicode text, gives clear errors for invalid Base64, and lets you copy the result or download it as a .txt file.

Base64 is an encoding, not encryption. Anyone can decode it, so never use it to hide passwords or other secrets.

How to use the Base64 encoder / decoder

  • Choose a mode: Encode turns text into Base64, and Decode turns Base64 back into text.
  • Paste your input: type or paste plain text to encode, or a Base64 string to decode.
  • Pick a variant: use Standard for most cases, or URL-safe for tokens, URLs, and filenames.
  • Convert, then copy or download: click Convert, then copy the result or save it as a .txt file. Use Swap to send the result back through the opposite mode.

Base64 variants

VariantCharactersBest for
StandardA–Z, a–z, 0–9, + and /, with = paddingEmail, data URIs, and general use
URL-safeA–Z, a–z, 0–9, - and _, no paddingURLs, JWT tokens, and filenames

Common uses for Base64

  • Data URIs: embed small images or fonts directly in HTML and CSS.
  • API payloads: send binary data inside JSON or other text-only formats.
  • Email attachments: MIME uses Base64 to carry files in email messages.
  • Tokens: JWT headers and payloads use URL-safe Base64.
  • Basic authentication: HTTP Basic auth encodes the username and password pair in Base64.
Whether you are debugging an API call or reading a token, a quick decode shows what is inside, and a quick encode makes text safe to send.

Worked examples

Encode text

Enter Hello, Xornex! in Encode mode with the Standard variant. The output is SGVsbG8sIFhvcm5leCE=, and the summary shows the size change.

Decode Base64

Switch to Decode mode and paste SGVsbG8sIFhvcm5leCE=. The tool returns the original text. Line breaks and spaces in the pasted Base64 are ignored.

Use URL-safe Base64

Choose the URL-safe variant before encoding. The result uses - and _ instead of + and /, and the trailing = signs are removed, so it can sit safely in a URL or filename.

Frequently asked questions

Is this Base64 tool free to use?

Yes. You can encode, decode, copy, and download without creating an account.

Is my data uploaded or stored?

No. All conversion happens in your browser. Nothing you type is sent to a server or saved, and clearing the form removes it from the screen.

Is Base64 a form of encryption?

No. Base64 only changes how data is represented, and anyone can reverse it. Use real encryption to protect sensitive information.

Does it support Unicode and emoji?

Yes. Text is converted as UTF-8 before encoding, so accents, non-Latin scripts, and emoji round-trip correctly.

Why does decoding show an error?

The input may contain characters outside the Base64 alphabet, have a missing or extra character, or decode to binary data that is not valid text. Check for typos and copy the full string.

Why is the Base64 output larger than the input?

Base64 represents every 3 bytes as 4 characters, so the encoded text is about one third larger than the original data.

Share this article