Base64 Encoder / Decoder
Encode and decode text using Base64 encoding.
Base64 Encoder / Decoder
Base64 is an encoding scheme that converts binary data into a string of 64 printable ASCII characters. It is widely used to embed images directly in HTML or CSS files, encode email attachments for safe transport, and transmit binary data over text-based protocols that cannot handle raw bytes. Paste any text into the input field to encode it instantly, or paste a Base64 string to decode it back to its original form. The tool works entirely in your browser — no data is ever sent to a server.
Understanding Base64
What Base64 actually does
Base64 converts binary data into a text alphabet of 64 safe characters: A-Z, a-z, 0-9, plus and slash, with equals signs used as padding. Three bytes of input become four characters of output, so encoded data is about 33 percent larger than the original. It exists because many protocols, such as email (MIME), JSON and HTML attributes, were designed for text and can corrupt arbitrary bytes.
Common use cases
Developers meet Base64 constantly: embedding small images in CSS or HTML as data URIs, sending file attachments in JSON APIs, reading the payload section of a JSON Web Token, and handling HTTP Basic authentication headers, which carry username:password encoded as Base64. This tool lets you quickly inspect or produce such values without writing code.
Base64 is not encryption
Anyone can decode Base64 instantly, so it provides no confidentiality. Never treat an encoded password or API key as protected. If you find credentials in Base64 inside a configuration file, consider them exposed and rotate them. Use proper encryption or a secrets manager for sensitive data.
Troubleshooting decode errors
If decoding fails, check for stray whitespace or line breaks, missing padding characters, or the URL-safe variant that replaces plus and slash with minus and underscore. Text containing non-ASCII characters such as accented letters or emoji must be treated as UTF-8 before encoding, otherwise the decoded result may look garbled.
How to use
- Select Encode to turn plain text into Base64, or Decode to turn a Base64 string back into readable text.
- Paste or type your content into the input box. The result updates automatically as you type.
- Copy the output with the copy button.
- If decoding fails, check that the input is valid Base64 — it should contain only A–Z, a–z, 0–9, +, / and optional = padding.
Frequently asked questions
Is Base64 a form of encryption?
No. Base64 is encoding, not encryption. Anyone can decode it back to the original data, so it provides no security. Use it for safe transport of data, not to protect secrets.
Why does my encoded text look longer than the original?
Base64 represents every 3 bytes of input as 4 characters, so the output is roughly 33% larger than the source. That overhead is the price of using only safe, printable characters.
Does my text get uploaded anywhere?
No. Encoding and decoding happen entirely in your browser. Nothing you paste here is sent to a server.