What Base64 is and why people use it
Base64 is a way to turn any text into a safe string of letters, numbers, plus signs, slashes and equals signs. Computers use it when a system only accepts plain text but needs to carry data that is not plain text, such as an image, a file, or a password with special characters. Email attachments, web tokens, and data URLs all use Base64 for exactly this reason. The encoded text looks like random characters, but it is not encryption. Anyone can decode it, so you should never use Base64 to hide a password or a secret.
This tool encodes and decodes Base64 right in your browser. Nothing you paste leaves your computer, which matters when the text is a token or a piece of private data. Type or paste text and the encoded version appears at once. Paste a Base64 string and press decode, and the original text comes back. It handles accented letters and emoji correctly, because it encodes the text as UTF-8 first, which many simple online tools get wrong.
How to use it
To encode, type or paste your text into the top box. The tool encodes it as you type, and the Base64 result appears in the bottom box with a count of input and output characters. Press the copy button to copy the result to your clipboard. To decode, paste a Base64 string into the top box and press the decode button. If the string is not valid Base64, the tool says so in red instead of failing silently. The clear button empties both boxes so you can start again.
Worked example
Take the text Hello, world! with an exclamation mark. The tool encodes it as SGVsbG8sIHdvcmxkIQ==, which is 20 characters from 13 characters of input. That growth is normal: Base64 turns every 3 bytes into 4 characters, so the output is about one third longer. Now paste SGVsbG8sIHdvcmxkIQ== back into the top box and press decode, and the tool returns Hello, world! exactly. Try it with café 123 as well. The tool encodes it as Y2Fmw6kgMTIz, and decoding that string returns café 123, accents included. That round trip proves the tool handles non-English text correctly.
Use cases
Developers use Base64 to test API tokens and to read the data inside a JSON web token, whose three parts are each Base64 encoded. They also use it to embed a small image directly in a web page as a data URL, so the page loads without a separate image file. Testers use it to check that an app encodes form data correctly before it is sent. Students use it to learn how encoding works, because the mapping between text and Base64 is easy to follow with short examples. Anyone who receives a strange-looking string in an email or a config file can paste it here to see if it is Base64 and what it says.
Honest limitations
Base64 is encoding, not encryption. It hides nothing from anyone who knows how to decode it, so never treat an encoded password or token as safe. The tool also only works with text. It cannot encode a file directly, although you can paste text content from a file. Very long inputs, such as a whole book, will still work, but the browser may slow down with millions of characters. Finally, Base64 has small variants, such as the URL-safe version that uses hyphens and underscores instead of plus and slash. This tool uses the standard alphabet, which is the one most systems expect.
Frequently asked questions
Is Base64 encryption? No. Base64 is encoding, which only changes the shape of the data. Anyone can decode it with no key, so it gives no security at all.
Why is Base64 longer than the original text? Base64 turns every 3 bytes into 4 characters, so the output is about 33 percent longer than the input. That is the price of using only safe characters.
What do the equals signs at the end mean? They are padding. They fill the last group up to a full 4 characters when the input length is not a multiple of 3. One equals sign means one byte of padding, two means two bytes.
Can I decode a URL-safe Base64 string? Mostly yes, but if it uses hyphens and underscores instead of plus and slash, replace those two characters first, or the decode may fail. This tool expects the standard alphabet.
También disponible en español: Codificador y Decodificador De Texto Base64
