Toolbox Hub
All Tools

Base64 Encoder/Decoder

Encode decode Base64

Encode decode Base64 Runs locally in your browser

About the

The Base64 Encoder and Decoder converts text or binary data to and from Base64, the encoding scheme used for data URIs, HTTP Basic authentication headers, and most email attachments. Encoding is done with the browser's built-in btoa/atob primitives, which means the transformation is byte-exact and Unicode text is handled correctly instead of producing mojibake. Use it when you need to embed a small image in CSS, decode a Basic auth token, or move binary data through a channel that only accepts text.

Where people use the

  • Encoding a small image so it can be inlined in CSS or HTML.
  • Creating a data URI for an email template that supports only certain assets.
  • Decoding a Basic authentication header to see what it contains.
  • Moving binary data through a field that only accepts plain text.

How to use the

  1. 1

    Paste the text or data URI

    Type into the input box, or paste a string that is already Base64 encoded.

  2. 2

    Choose encode or decode

    Encode turns plain text into Base64. Decode turns a Base64 string back into readable text.

  3. 3

    Copy the output

    Copy the result and use it in your URL, header, or file.

Frequently asked questions

Is Base64 encryption?

No. Base64 is an encoding, not encryption. Anyone can decode it without a key, so never use it to hide passwords or secrets.

Why did my decoded output look like garbage?

That usually means the input was encoded as UTF-8 text and then treated as binary. Decoding a UTF-8 payload requires a byte-level round trip, not a plain text decode.

Can I encode an image to a data URI?

Yes. Encode the file and prefix the result with data:image/png;base64, to embed it directly in HTML or CSS.

Does encoding change the file size?

Base64 always increases size by about one third, since every three bytes become four characters. Plan for that when you set size limits.

Related Tools