How to use the Base64 tool
- Choose Encode to turn text into Base64, or Decode to turn Base64 back into text.
- Paste your text or Base64 string into the input box.
- The result appears right away. Copy it with one click.
When decoding, you do not need to worry about line breaks, missing padding or URL-safe characters. The tool cleans those up for you.
Example
Hello, world! encodes to SGVsbG8sIHdvcmxkIQ==
Where you will run into Base64
- Email attachments: files are Base64 encoded inside the email so they survive the trip as plain text.
- Data URLs: small images embedded in HTML or CSS, starting with
data:image/png;base64,. - JWT tokens: the header and payload sections are URL-safe Base64. Decode the middle part to see what a token contains.
- HTTP Basic authentication: the
Authorizationheader holds a Base64 encoded "username:password". Another reason it is not secure without HTTPS. - APIs and config files that need to carry binary data inside JSON or YAML.
A note on UTF-8
The browser's built in btoa() function fails on anything outside basic Latin letters, which is why some online encoders break on emoji or non English text. This tool converts the text to UTF-8 bytes first, so "café" and "😀" encode the same way they would in Python, PHP or a command line tool.