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…

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.

Related Tools