Skip to main content
FixLines

Base64 encode and decode

Convert text to Base64, or decode Base64 back to text.

Editor

Ln 1, Col 10 lines0 words0 characters

Base64 encode and decode: what it does

Base64 turns any text into a string of safe characters for emails, data URLs, tokens and configuration files. Encode your text, or paste a Base64 string and decode it. Accented letters and emoji are handled as UTF-8. If the Base64 is invalid, you get a clear message.

Base64 encode and decode: how to use it

  1. Paste your text, or the Base64 string to decode.
  2. Choose Base64 encode or Base64 decode.
  3. Select Apply and copy the result.

Base64 encode and decode: when to use it

  • Embed a small text or a credential in a configuration file or an HTTP header that expects Base64.
  • Read a Base64 value found in a log, a token or an email source.
  • Check what a Base64 string contains before pasting it into a script.

Base64 encode and decode: examples

Encode a greeting

Input

Hello, World!

Result

SGVsbG8sIFdvcmxkIQ==
Decode it back

Input

SGVsbG8sIFdvcmxkIQ==

Result

Hello, World!
Encode text with accents and emoji

Input

Café ☕ at 8

Result

Q2Fmw6kg4piVIGF0IDg=

Base64 encode and decode: questions and answers

Is Base64 a form of encryption?

No. Base64 only changes how data is written and anyone can decode it. Do not use it to protect secrets.

Why does decoding fail?

The text contains characters outside the Base64 alphabet or is incomplete. Remove spaces and check that the string is whole.

Why does the result end with equals signs?

Base64 writes data in groups of three bytes; one or two equals signs pad the last group when the text length is not a multiple of three.

Is the Base64 URL-safe?

It uses the standard alphabet with plus and slash. For a URL, run URL encode on the result or replace those two characters.

Is my text sent to a server?

No. Everything runs in your browser on your own device, so your text never leaves it.

Tools people often use together with this one.

More in Encode & decodeBrowse all text tools