Base64 Encode/Decode

Encode text to Base64 or decode Base64 back to text instantly. Supports full UTF - 8 including emoji and international characters.

Base64 encoding is used everywhere: embedding images as data URIs, passing binary payloads through JSON APIs, encoding email attachments via MIME, and storing tokens or credentials in configuration files. Having a quick, reliable encoder and decoder saves round - trips to documentation and avoids subtle bugs caused by character - set mismatches.

How to use

  1. Paste text or a Base64 string into the input field.
  2. Choose Encode or Decode mode.
  3. View the converted result in the output area.
  4. Copy the result to your clipboard with one click.

Why this tool is useful

Base64 encoding is used in data URIs, email attachments, API payloads, and embedded assets. When you need to encode a file or decode a Base64 string back to its original form, doing it manually is impractical. A codec tool handles both directions reliably.

This is especially useful when debugging embedded images, verifying file contents in API responses, or preparing inline assets for HTML or CSS.

What this tool helps with

Encoding and decoding files or text in one step reduces errors from incorrect padding or character handling. You can quickly verify that a Base64 string produces the expected output before using it in production.

The tool also clarifies whether the encoded content is text or binary, which helps you handle the result appropriately in your workflow.

Examples

Encoding an image for use as a data URI

Data URIs embed file content directly in HTML or CSS. Encoding the image to Base64 and wrapping it in the correct MIME prefix avoids external file dependencies.

Decoding a Base64 payload from an API response

Some APIs return file content as Base64 strings. Decoding lets you inspect or save the actual file without writing a script.

Verifying that encoded content round - trips correctly

Encoding and then decoding should produce the original input. Testing this round - trip helps catch charset or padding issues early.

Recommended for

Recommended for developers working with data URIs, API payloads containing embedded files, and anyone who needs to inspect or prepare Base64 - encoded content.

Privacy and processing

All processing happens in your browser. Your data is never sent to our servers.

Frequently Asked Questions

What is Base64 encoding?
Base64 is a binary - to - text encoding scheme that represents binary data as a string of printable ASCII characters. It uses 64 characters (A - Z, a - z, 0 - 9, +, /) plus = for padding.
Is Base64 the same as encryption?
No. Base64 is an encoding, not encryption. Anyone can decode a Base64 string. It provides no security or confidentiality.
Is my data uploaded to your servers?
No. All encoding and decoding happens locally in your browser. Your data never leaves your device.
Does this support Unicode and emoji?
Yes. The tool uses UTF - 8 encoding via TextEncoder and TextDecoder, so Korean, Japanese, emoji, and all other Unicode characters are fully supported.
Why does Base64 output look longer than the input?
Base64 encoding increases the size by roughly 33% because every 3 bytes of input become 4 ASCII characters.
What is the difference between Base64 and URL encoding?
Base64 converts binary data to ASCII text. URL encoding (percent - encoding) makes text safe for use in URLs. They serve different purposes.
Can I decode Base64 - encoded images here?
This tool decodes Base64 to text. For binary data like images, the decoded output may not display meaningfully as text.
Does this work offline?
Yes. Once the page loads, encoding and decoding run entirely in the browser with no network requests.

Related Tools