Base64 encode and decode
Convert text to Base64, or decode Base64 back to text.
Editor
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
- Paste your text, or the Base64 string to decode.
- Choose Base64 encode or Base64 decode.
- 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
Input
Hello, World!
Result
SGVsbG8sIFdvcmxkIQ==
Input
SGVsbG8sIFdvcmxkIQ==
Result
Hello, World!
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.
Related tools
Tools people often use together with this one.
- URL encode and decode
Percent-encode text for a URL, or decode it back.
- HTML entities encode and decode
Escape text for HTML, or turn entities back into characters.
- Text to hex converter
Convert text to hexadecimal bytes, or hex back to text.
- Text to binary converter
Convert text to binary code, or binary back to text.
- ROT13 encoder and decoder
Scramble or unscramble letters with ROT13.
- Unicode escape and unescape
Turn non-ASCII characters into \u escapes, or back.
- Morse code translator
Translate text to Morse code, or Morse back to text.