Base64 Encoder and Decoder

Turn text into Base64, or Base64 back into text.

FreeNo sign-upRuns in your browser

Text to encode

0 characters

Result

The result shows up here

How to use it

  1. Choose encode or decode

    Encode turns plain text into Base64. Decode turns Base64 back into text.

  2. Paste your input

    The result appears as you type. Turn on URL-safe if the output goes into a link.

  3. Copy the result

    Copy it, or press Swap to send the result back in as the new input.

This Base64 encoder and decoder converts text both ways and handles accents, Bangla, emoji and every other language. Choose the standard alphabet or the URL-safe one. It all runs in your browser, so tokens, headers and test strings are never uploaded.

Where Base64 shows up

Web tokens

The readable parts of a JSON Web Token are Base64 in URL-safe form. Decode one to see what it claims, but remember anyone can do the same.

Data in links

Small images and fonts are sometimes placed straight into a page as a data link. The file is stored as Base64 inside the address.

Email attachments

Email was built for plain text, so attachments travel as Base64. That is why a file grows by about a third when it is sent.

Basic login headers

HTTP basic authentication sends name and password as Base64. It is not secure on its own, so it must always go over HTTPS.

Common questions

What is Base64?
Base64 is a way to write any data using only 64 safe characters: letters, numbers, plus and slash. It is used to carry text or small files through systems that only handle plain text, such as email and some web addresses.
Is Base64 encryption?
No. Anyone can decode it in a second, as this tool shows. Never use Base64 to hide a password or a secret. It only changes how the data is written, it does not protect it.
What is URL-safe Base64?
Normal Base64 uses plus and slash, which have special meanings in web addresses. The URL-safe form swaps them for minus and underscore and drops the equals signs at the end, so the result can sit in a link or a file name.
Does it handle emoji and non-English text?
Yes. Text is turned into UTF-8 bytes before encoding and read back the same way when decoding, so accents, Bangla, Arabic, Chinese and emoji all round-trip correctly.
Why does decoding say my input is invalid?
The text probably has a character outside the Base64 alphabet, a missing piece at the end, or it is not Base64 at all. Remove spaces and line breaks you added by hand, and check that you copied the whole string.

More free tools

All free tools
JSON Formatter and Validator

Paste JSON to format, check or minify it. Shows the line and column of any error.

Runs in your browser
Password Generator

Make strong random passwords with a strength meter. Nothing is stored or sent.

Runs in your browser
QR Code Generator

Make QR codes for links, text and WiFi. Pick colors and download PNG or SVG.

Runs in your browser
Text Diff Checker

Compare two texts and see what was added or removed, by line, word or character.

Runs in your browser