Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 back to plain text, instantly, in one tool.

Plain Text
Loading editor…
Base64 Output
Loading editor…

Related Tools

Learn more about the Base64 Encoder & Decoder

What is Base64 Encoding & Decoding?

Base64 is an encoding scheme that represents binary data as plain ASCII text, using 64 characters (A–Z, a–z, 0–9, +, /). It exists because many systems — email, JSON, XML, URLs — are designed to carry text, not arbitrary binary bytes. Encoding data to Base64 makes it safe to embed or transmit through those text-only channels without corruption.

Encoding converts plain text or binary input into its Base64 representation — the direction needed when preparing a value for an HTTP Basic Auth header, embedding a small asset as a data: URI, or storing a value in a system (like Kubernetes Secrets) that expects Base64 input. Decoding reverses that: it takes a Base64 string and converts it back to its original form, which works for anything that was originally text (JSON, JWT segments, config values, plain messages).

Encoding to Base64 typically increases the size of the data by about 33%, since each group of 3 raw bytes is represented using 4 ASCII characters. It's worth noting that Base64 is not encryption — it provides no confidentiality in either direction, since anyone can decode it back to the original without a key.

This page lets you encode text to Base64, or decode Base64 back to text, online for free, directly in your browser. Switch between Encode and Decode with the toggle above — nothing is uploaded or sent to a server.

Why Encode or Decode Base64?

API Requests & Tokens

Encode credentials for an HTTP Basic Auth header before sending a request, or decode an API token or JWT segment to inspect the value inside it.

Config & Secrets

Kubernetes Secrets and some environment variable systems store values Base64-encoded. Decode one to see what a deployed config actually contains, or encode a new value to store.

Embedding Binary in Text

JSON, XML, and URLs are text-only formats. Encoding binary data (like a small image) to Base64 lets it travel safely inside them — decode it back out to verify or extract the original.

Data URIs

Encode an image or font to embed it directly in HTML or CSS via a data: URI, avoiding an extra network request — or decode an existing one to inspect it.

Example

The same pair works in both directions — encode the plain text to get the Base64 string, or decode the Base64 string to get the plain text back.

Plain text
Hello, World!
Base64
SGVsbG8sIFdvcmxkIQ==

Features

Encode & Decode

Convert plain text to Base64, or Base64 back to plain text — both directions, one tool.

One-Click Mode Switch

Toggle between Encode and Decode at the top. If you already have output, it carries over as the new input, so you can round-trip a value instantly.

100% Client-Side

Encoding and decoding happen entirely in your browser. Your data is never uploaded or sent to a server.

Email & MIME

Produce Base64 payloads for MIME messages, or decode ones pulled from raw email source.

Data URIs

Generate the Base64 portion of a data: URI to embed a small asset, or decode one to inspect it.

How to use

Paste your input in the left editor. The output appears automatically on the right. Use the toolbar buttons to copy, download, or transform the result.

  1. Paste or type your content in the input editor on the left.
  2. The formatted output is generated automatically.
  3. Use Copy, Download, or other actions from the output toolbar.
  4. Click the expand icon to view the output in fullscreen.
FAQ

Is this Base64 encoder/decoder free?

Yes, the tool is completely free to use with no limits, signup, or account required.

Is my data uploaded to a server?

No. All encoding and decoding happens locally in your browser using JavaScript. Your data is never uploaded or sent to a server.

How do I switch between encoding and decoding?

Use the Encode / Decode toggle at the top of the tool. If you already have output, switching modes carries it over as the new input, so you can round-trip a value (encode, then immediately decode it back) without retyping anything.

What is Base64?

Base64 is an encoding scheme that converts binary data into a text string using 64 ASCII characters. It is commonly used to transmit binary data over text-based protocols.

Is Base64 encryption?

No. Base64 is encoding, not encryption. Anyone can decode Base64 without a key — it provides no security.

Why did decoding fail with an error?

The input isn’t a valid Base64 string — usually caused by missing padding (=), extra whitespace, or characters outside the Base64 alphabet (A–Z, a–z, 0–9, +, /). Check the string was copied in full.