AD BANNER 728×90

Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 strings — instantly, client-side, 100% private.

Your result will appear here…
AD 468×60

How to Use

Select Encode to convert plain text into a Base64 string, or Decode to reverse the process. Toggle URL-safe to use - and _ instead of + and /, which is required for Base64 used in URLs and JWT tokens.

  1. Paste or type your input text in the box above.
  2. Choose Encode or Decode mode.
  3. Click Convert — the result appears instantly.
  4. Hit Copy to copy the output to your clipboard.

What is Base64?

Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It is commonly used to embed binary data (images, files) in text formats such as HTML, CSS, XML, JSON, and email.

Common Use Cases

  • Encoding binary files for embedding in HTML/CSS (data: URIs)
  • Transmitting data in HTTP headers or query strings
  • Encoding credentials in HTTP Basic Authentication
  • Storing or transmitting JSON Web Tokens (JWT)
  • Encoding email attachments (MIME)

URL-safe Base64

Standard Base64 uses + and / which are special characters in URLs. URL-safe Base64 replaces these with - and _ respectively, making the encoded string safe for use in URLs without percent-encoding.

Frequently Asked Questions

Is this Base64 tool safe to use with sensitive data?
Yes. All encoding and decoding happens entirely in your browser using JavaScript. No data is ever sent to our servers. Your input stays private on your device.
Why does my Base64 string end with "=="?
Base64 encodes 3 bytes at a time into 4 characters. If the input length is not a multiple of 3, padding characters (=) are added to make the output length a multiple of 4. One = means 1 padding byte was needed; two == means 2.
Can I encode images to Base64?
This tool handles text input. To encode binary files like images, you can read the file as a data URL using the FileReader API in a browser, or use a dedicated file-to-Base64 tool.
What's the size increase when encoding to Base64?
Base64-encoded data is approximately 33% larger than the original binary data, because 3 bytes of input become 4 characters of output.