Base64 Encode & Decode

Encode text to Base64 or decode Base64 back to text. Supports UTF-8.

πŸ”’ 100% private β€” runs entirely in your browser
or try sample data

What is Base64?

Base64 is a binary-to-text encoding scheme that represents binary data as an ASCII string. It is commonly used in data URLs, email attachments (MIME), JSON Web Tokens (JWT), and embedding binary data in text-based formats like HTML, CSS, or XML.

  • Encode β€” convert any text (including Unicode and emojis) into a Base64 string.
  • Decode β€” convert a Base64 string back to its original text.
  • UTF-8 support β€” correctly handles multi-byte characters, accented letters, and emoji.
  • Swap β€” move the output back to input for chained conversions.
  • Privacy-first β€” all processing happens in your browser.

How to Use Base64 Encoder/Decoder

Encode or decode Base64 in three quick steps.

1. Paste Your Input

Enter plain text to encode or a Base64 string to decode. The tool auto-detects the direction, or you can choose explicitly.

2. Click Encode or Decode

Hit Encode to convert text to Base64, or Decode to convert Base64 back to readable text. Full UTF-8 support is built in.

3. Copy or Swap

Copy the result with one click, or use Swap to move the output back to the input field for round-trip testing.

Common Use Cases

Building API Auth Headers

Encode username:password credentials to Base64 for HTTP Basic Authentication headers. Paste the pair, click Encode, and drop the result into your Authorization: Basic header.

Decoding Data URIs

Extract the readable content from data:text/plain;base64,... strings found in HTML, CSS, or email templates. Paste the Base64 portion and decode instantly.

Inspecting JWT Token Parts

JWT tokens use Base64url encoding for the header and payload segments. Decode individual segments here to inspect claims without a dedicated JWT tool.

Embedding Files in JSON or XML

Encode small files (icons, certificates, config snippets) to Base64 for embedding directly in JSON payloads, XML documents, or environment variables.

Frequently Asked Questions

How do I encode or decode Base64 online?

Paste your text or Base64 string into the input field. Click Encode to convert text to Base64, or Decode to convert Base64 back to plain text. The result appears instantly β€” no server processing required.

What is Base64 encoding?

Base64 is a binary-to-text encoding scheme that represents binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /). It's commonly used to embed images in HTML/CSS, send binary data in JSON or XML, encode email attachments, and pass data in URLs.

Is my data safe when encoding or decoding Base64 here?

Yes. All encoding and decoding happens entirely in your browser using client-side JavaScript. Your data is never sent to any server, making it safe for API keys, tokens, credentials, and other sensitive content.

Does this tool support UTF-8 and special characters?

Yes. The encoder handles full UTF-8 text including accented characters, emoji, Chinese, Japanese, Arabic, and other non-ASCII text. The tool properly encodes multi-byte characters so they decode correctly.

What is the difference between Base64 and URL encoding?

Base64 converts binary data to a string of 64 ASCII characters and is used for embedding data or transmitting binary content as text. URL encoding (percent-encoding) replaces unsafe URL characters with %XX sequences and is used specifically for making strings safe in URLs and query parameters.

Is this Base64 tool free to use?

Yes, completely free with no registration or usage limits. Encode and decode as many times as you need β€” all processing happens locally in your browser.