Base64 Encoder / Decoder

Encode or decode text and files to/from Base64 instantly.

Plain Text 0 chars
Base64 Output
// Output appears here

Drop a file to encode it to Base64 (images show preview)

or

About the Base64 Encoder / Decoder

Convert text, files and images to Base64 and back. Base64 encodes binary data using 64 printable ASCII characters, which is how images get embedded in CSS as data URLs, how attachments travel through email, and how binary blobs get carried inside JSON. Encoding and decoding happen locally through the browser, so credentials and private files stay on your machine.

How to use the Base64 Encoder / Decoder

  1. Choose encode or decode

    Switch between the two modes depending on whether you are producing Base64 or reading it back into its original form.

  2. Paste text or drop a file

    Type or paste directly into the input, or drag a file onto the drop zone. Images are read as data URLs and shown as a preview alongside the encoded output.

  3. Copy the result or download the file

    Copy the output to your clipboard with one click, or download a decoded image or file. Your last input is saved locally so it survives a page reload.

When to use it

Embedding images in CSS or HTML

Convert a small icon to a data URL so it ships inside the stylesheet instead of costing an extra HTTP request.

Inspecting Basic Auth headers

Decode the Base64 portion of an Authorization header to confirm which credentials a client is actually sending.

Moving binary data through JSON

Encode a file so it can be carried inside a JSON field, then decode the response to verify it round-tripped intact.

Frequently asked questions

Is Base64 encryption?

No, and this matters. Base64 is an encoding, not encryption — anyone can decode it instantly with no key. Never use it to protect passwords, tokens or personal data.

Why is my Base64 string larger than the original file?

Base64 represents every 3 bytes as 4 ASCII characters, so encoded output is roughly 33% larger than the input. This is why data URLs are only worth using for small assets.

What does the "=" at the end mean?

It is padding. Base64 works in 3-byte groups, so when the input length is not divisible by 3 the encoder appends one or two "=" characters to complete the final group.

Are my files uploaded anywhere?

No. Files are read with the browser FileReader API and encoded in memory. Nothing is sent over the network at any point.

Does it handle Unicode and emoji correctly?

Yes. Text is encoded as UTF-8 before Base64 conversion, so accented characters, non-Latin scripts and emoji survive the round trip intact.