This encodes plain text into Base64, or decodes Base64 back into its original form. Base64 represents data using only 64 safe, printable characters, which is useful for embedding it somewhere that doesn't handle raw binary or special characters well, like a URL, JSON, or email.
How to use it
- Type or paste the text you want to encode or decode.
- Click encode to convert plain text to Base64.
- Click decode instead if you're starting from Base64.
- Read the result underneath.
- Copy it wherever you need it.
When it helps
- Encoding credentials for an HTTP header, like Basic Authentication.
- Decoding a Base64 string in an API response to see what it actually says.
- Embedding small binary data safely inside a text based format like JSON.
- Encoding text with special characters so it fits safely in a URL parameter.
- Quickly checking what a Base64 string in code or logs actually decodes to.
Good to know
- Base64 is an encoding, not encryption. Anyone can decode it, so it doesn't provide any privacy on its own.
- The output runs about a third larger than the original text.
- Decoding fails or produces garbage if the Base64 string is incomplete or was altered.
- When troubleshooting an API integration, decode any Base64 fields in a request or response early, since misreading encoded data as an error is a common source of confusion.
- When sharing an encoded string with someone else, mention what the original content was, since Base64 text gives no visual hint about what it actually represents.
Questions
Is Base64 a form of security?
No, it's just a different, text safe way of writing the same data. Anyone with the encoded string can decode it in seconds, so it should never be relied on for privacy.
Why does encoded text often end with an equals sign?
That's padding, added when the original data's length isn't a clean multiple of three bytes, so the encoded output always comes out as a multiple of four characters.
Can Base64 encode any kind of data, not just text?
Yes, it can represent any binary data, including files and images, though this tool is set up for encoding and decoding plain text specifically.
Why does my decoded text look garbled?
This usually means the original text wasn't actually Base64, was cut off, or used a different character encoding than expected. Double check you copied the complete, unmodified string.
Is this the same encoding used for embedding images in HTML?
Yes, the same scheme is used for embedding image data as a data URL, though that use case also typically includes a MIME type prefix describing the format.
Can encoding a very long piece of text cause a problem?
Not typically, though extremely long input will take a moment longer to process and will produce a correspondingly long encoded string.