Base64 Encode / Decode

Encode or decode Base64 text and data URIs.

Free online Base64 encoder and decoder

Convert text to Base64 or decode Base64 back to plain text instantly. This Base64 converter is fully UTF-8 safe, so emoji, accented characters, and any other Unicode encode and decode without corruption. It is perfect for embedding images in CSS, building data URIs, debugging API payloads, decoding JSON Web Token segments, and moving binary data through text-only channels. Everything runs live in your browser as you type.

How to encode or decode Base64

  1. Choose Encode to convert text to Base64, or Decode to turn Base64 back into text.
  2. Type or paste your content into the input box on the left.
  3. Read the converted result in the output box — it updates automatically.
  4. Use Swap to move the result into the input and flip the mode for a quick round trip.
  5. Click Copy result to copy the output, or Clear to start over.

Common uses for Base64

Developers reach for Base64 whenever binary data needs to survive a text-only transport. It powers data: URIs that inline images and fonts, encodes attachments in email, and packages credentials in HTTP headers. When decoding, this tool automatically ignores the spaces and line breaks that often appear in wrapped MIME blocks and data URIs, so pasting a messy string still works. If you are cleaning up API requests, you may also want the URL encoder / decoder for percent-encoded query strings, or the JSON formatter to pretty-print a decoded payload.

Private and secure by design

Base64 is an encoding, not encryption — it hides nothing, since anyone can decode it. Because this converter runs entirely client-side, your data is never uploaded, making it safe to work with sensitive strings. For real data integrity or fingerprinting, generate a checksum with the hash generator instead.

Frequently asked questions

What is Base64 encoding?

Base64 is a way of representing binary or text data using only 64 printable ASCII characters (A–Z, a–z, 0–9, + and /). It is commonly used to embed images in HTML/CSS, send data in JSON or URLs, encode email attachments, and store binary data in text-only systems. Encoding makes data safe to transmit, but it is not encryption — anyone can decode it.

How do I encode text to Base64?

Set the tool to Encode, then type or paste your text into the input box. The Base64 output appears instantly in the box below. Click Copy to grab the result. Encoding is fully Unicode-safe, so emoji, accented letters, and other UTF-8 characters convert correctly.

How do I decode Base64 back to text?

Switch to Decode mode and paste your Base64 string. The tool automatically strips spaces and line breaks, then decodes the value back to readable UTF-8 text. If the input is not valid Base64, you will see a clear inline message instead of a broken result.

Does this tool handle data URIs?

Yes. When you decode, the Copy button copies the exact decoded output, and the tool tolerates the whitespace and line wrapping often found in data URIs and MIME-encoded blocks. To decode just the payload of a data URI such as data:text/plain;base64,SGVsbG8=, paste the part after the comma.

Is my data sent to a server?

No. All encoding and decoding happens locally in your browser with JavaScript. Nothing you type is uploaded, logged, or stored, so it is safe to convert private or sensitive strings.

Is Base64 the same as encryption?

No. Base64 is an encoding, not encryption — it provides no secrecy because anyone can reverse it. If you need to protect data, use proper encryption or hashing. For fingerprinting or checksums, try a hash instead of Base64.