Tools/Base64 Encode / Decode

Base64 Encode / Decode

Convert text to and from Base64, with URL-safe support.

Text
Base64

Runs entirely in your browser — your data never leaves this page.

About the Base64 Encode / Decode

This Base64 encoder and decoder converts text to Base64 and back instantly. Base64 is an encoding scheme that represents binary data using 64 printable ASCII characters, commonly used to embed images in CSS, transmit data in JSON or URLs, and store credentials in HTTP headers.

The tool is fully Unicode-safe (it correctly handles emoji and non-Latin scripts) and supports URL-safe Base64, which swaps the "+" and "/" characters for "-" and "_" so the output can be used in URLs and filenames.

How to use it

  1. 1Choose Encode to convert text to Base64, or Decode to convert Base64 back to text.
  2. 2Enable the URL-safe option if you need output that is safe to use in URLs or filenames.
  3. 3Type or paste your input — the result updates as you type.
  4. 4Copy the output with one click.

Common use cases

  • Embedding images or fonts as data URIs
  • Encoding credentials for HTTP Basic Auth headers
  • Passing binary-ish data through JSON or query strings
  • Decoding Base64 payloads while debugging

Frequently asked questions

Does this tool handle emoji and Unicode correctly?

Yes. It encodes text as UTF-8 before converting to Base64, so emoji, accented characters, and non-Latin scripts round-trip correctly — unlike a naive btoa() call, which throws on characters outside Latin-1.

What is URL-safe Base64?

Standard Base64 uses "+" and "/", which have special meaning in URLs. URL-safe Base64 replaces them with "-" and "_" and drops padding, so the encoded string can be placed in a URL, query parameter, or filename without escaping.

Is Base64 encryption?

No. Base64 is encoding, not encryption. Anyone can decode it, so never use Base64 to protect passwords or sensitive data — it only changes the representation, not the security.