Base64 Encoder & Decoder

Encode and decode Base64 strings instantly in your browser

Input
Enter plain text to encode, or Base64 to decode
Output
Encoded or decoded result

About Base64

Base64 encodes binary data as ASCII text. Uses native btoa() / atob() — no data leaves your browser.

How to Use This Tool

  1. Choose the mode: "Encode" to convert text to Base64, or "Decode" to convert Base64 back to plain text.
  2. Paste or type your input into the text field.
  3. The result is generated instantly as you type.
  4. Click "Copy" to copy the encoded or decoded output to your clipboard.

Common Use Cases

  • Encoding binary data (images, files) to embed directly in HTML, CSS, or JSON.
  • Decoding Base64-encoded API response payloads to inspect their content during debugging.
  • Encoding credentials for HTTP Basic Authentication headers (username:password → Base64).
  • Embedding small images as Base64 Data URIs in CSS to eliminate extra HTTP requests.
  • Decoding the payload section of a JWT token for quick inspection without a dedicated tool.

Frequently Asked Questions

What is Base64 encoding?

Base64 is an encoding scheme that converts binary data into a safe ASCII string representation using 64 printable characters (A–Z, a–z, 0–9, +, /). It is commonly used to transmit binary data through systems that only handle text.

Does Base64 encrypt my data?

No. Base64 is encoding, not encryption. It is trivially reversible by anyone — there is no secret key involved. Never use Base64 to hide or protect sensitive information.

Why does Base64 output have "=" padding at the end?

Base64 encodes every 3 bytes of input as 4 characters. When the input length is not a multiple of 3, one or two "=" characters are added as padding to keep the output length a multiple of 4.

How does this tool handle non-ASCII (Unicode) characters?

The tool converts the input to UTF-8 bytes before encoding, ensuring that Unicode characters such as emoji and accented letters are correctly handled. Decoding reverses this process.

Related Tools

JSON Formatter

Format and validate JSON instantly

Use Tool

URL Encoder

Encode and decode URLs

Use Tool

Hash Generator

Generate MD5, SHA-1, SHA-256 and SHA-512 hashes

Use Tool