Base64 Encode/Decode
Base64 represents data using only 64 printable characters (A to Z, a to z, 0 to 9, + and /, with = used for padding), so it can pass through channels that expect plain text: email bodies, JSON fields, HTTP headers, config files and environment variables.
Paste text and choose Encode to get its Base64 form, or paste a Base64 string and choose Decode to read the text inside. Text is handled as UTF-8, so accented letters, symbols and emoji survive the round trip. This tool works on text only. It does not convert files or images.
Runs in your browser. Base64 Encode/Decode processes your input on your own device. Nothing you enter or upload is sent to a server.
Did this tool help you? ☕
WebzTools is free to use. If this tool saved you some time, you can support the project with a coffee and help us keep improving the tools.
(opens in a new tab)How to use the Base64 Encode/Decode
- Paste plain text, or a Base64 string, into the input box.
- Select Encode to Base64 or Decode from Base64.
- Read the result in the output box. Swap moves it into the input box if you want to run it back the other way.
- Select Copy Result.
Supported formats: Text in, text out. The standard Base64 alphabet (A to Z, a to z, 0 to 9, + and /) with = padding. Not files, images or binary data.
Encoding examples
Decoding works the other way: paste either output into the input box and choose Decode to get the original text back.
Plain ASCII text
Input
Hello, World!
Output
SGVsbG8sIFdvcmxkIQ==
Text with non-ASCII characters (UTF-8)
Input
café ✓
Output
Y2Fmw6kg4pyT
What Base64 is for, and what it is not
Base64 is a transport format. It lets data that is not safe to put in a text field, or that would be mangled by one, travel as ordinary characters. Common places are email attachments, small blobs embedded in JSON, and the user:password pair in an HTTP Basic authentication header.
It is not encryption. Anyone can decode a Base64 string with no key, so it hides nothing. If what you want is a one-way fingerprint rather than a reversible encoding, use the Hash Generator.
Base64 is also not URL encoding. The + and / characters and the = padding have special meaning inside URLs, so Base64 placed in a query string needs to be percent-encoded as well. The URL Encoder and Decoder handles that part.
If decoding fails
- Invalid Base64 string appears when the input contains characters outside the standard alphabet. URL-safe Base64, which uses - and _ in place of + and / (as in the segments of a JSON Web Token), is not accepted. Replace - with + and _ with / and try again.
- If the Base64 holds binary data rather than UTF-8 text, such as an image, a zip file or a signature, there is no readable text to show and decoding reports an error.
- Missing = padding and stray spaces or line breaks inside the string do not stop decoding.
Things worth knowing
- Base64 is an encoding, not encryption. It provides no confidentiality whatsoever.
- Text only: no file or image conversion, and no URL-safe alphabet or line-wrapping options.
Frequently asked questions
Is Base64 a form of encryption?
No, and this is worth being clear about. Base64 is a reversible encoding with no key; anyone can decode it instantly. It hides nothing. Never treat a Base64 string as a way of protecting a secret.
Why is the encoded version larger?
Base64 represents every three bytes as four characters, so the output is about a third larger than the input. That is the cost of making binary data safe to put in a text field.
Can I convert an image or file to Base64?
No. This tool only encodes and decodes text you type or paste. It has no file or image upload, and it cannot turn decoded Base64 back into a file.
Can I use it to read a JWT?
Partly. A JSON Web Token has three dot-separated parts in URL-safe Base64. Copy one of the first two parts, change - to + and _ to /, and decode it to see the JSON inside. The third part is a binary signature and will not decode to text.
Is my input uploaded?
No. Encoding and decoding use built-in browser functions, so the data stays on your device, which matters if you are decoding a token to inspect it.