Base64 Converter

What is Base64?

Base64 is a way of writing any data, text or a file, using only 64 safe characters: the letters, the digits, plus and slash. It was made for places that can carry text but would break on anything else, such as an email, a URL, a JSON field or an HTML attribute. Every 3 bytes of the original become 4 characters, so the encoded text is always about a third longer. Hello becomes SGVsbG8=.

Is Base64 a way to hide or protect data?

No. Base64 is not encryption and not a password. Anyone can decode it in a second, with this page or any other. If something is sensitive, such as a password, a key or a token, encoding it as Base64 hides nothing.

Why does the text end with = signs?

Base64 works in groups of 3 bytes. When the data does not fill the last group, one or two = signs are added to complete it. They carry no information, which is why the variant URL-safe, no padding leaves them out. When you decode, the tool accepts the text with or without them.

Standard, URL-safe or MIME?

Standard uses + and /, and is what most programs expect. Those two characters mean something inside a web address, so URL-safe swaps them for - and _. That is the form used in JWT login tokens, in file names and in many query strings. MIME is the standard form cut into lines of 76 characters, as email uses it. Decoding understands all of them without being told.

Why do accented or non-English letters give a different result in another tool?

Text has to become bytes before it becomes Base64, and there is more than one way to do that. UTF-8 is the modern one and covers every language and every emoji. Latin-1 is an older one with only 256 characters. The letter é is w6k= in UTF-8 and 6Q== in Latin-1. If a result looks wrong, check that both sides use the same text encoding. When in doubt, use UTF-8.

Why does the decoded text look strange, or the tool says it is not valid?

A single wrong or missing character in the Base64 is enough, and the message tells you which one and where. If the text decodes but looks like noise, it was probably never text: a picture, a PDF or a compressed file. The tool says so when it recognises one, and Download saves the bytes as a file. Characters that look broken, such as é instead of é, usually mean the data is UTF-8 and was read as Latin-1.

Can I decode a JWT here?

Yes, for reading. A JWT, the long token with two dots in it, is three Base64 parts. Paste it into Decode and the tool shows the header and the payload as formatted JSON, and tells you when it expires. It does not check the signature, so never use it to decide whether a token can be trusted.

Is my text sent anywhere?

No. Encoding and decoding happen in your browser. Whatever you paste stays on your device. To turn a picture into Base64, or the other way round, use Image to Base64 and Base64 to Image.