CalcMint

Base64 Encoder and Decoder

Paste Base64 to decode it, or type text and pick a file to encode it. UTF-8, emoji and URL-safe Base64 all work.

Base64 encoder / decoder

Or encode a file:

Base64

18 B → 24 B

Add this calculator to your website

Copy the code and paste it into your page's HTML. It's free; please keep the credit link.

How Base64 works

Base64 (RFC 4648) splits data into groups of 3 bytes (24 bits) and writes each 6-bit piece as one of 64 characters: A–Z, a–z, 0–9, + and /. When the last group is short, = pads the output to a multiple of 4.

Text is first turned into bytes with UTF-8, which is why "é" or an emoji becomes several bytes before encoding. Decoders in other tools that assume Latin-1 produce garbled characters for the same input.

Where you'll meet Base64

  • Email attachments (MIME, with a line break every 76 characters)
  • Data URIs that embed images in HTML and CSS: data:image/png;base64,…
  • HTTP Basic authentication headers
  • JSON Web Tokens and many API keys (URL-safe Base64)
  • Binary data in JSON and XML, such as certificates and keys (PEM)

Frequently asked questions

Is Base64 encryption?

No. Base64 is a reversible way of writing bytes as letters and digits. Anyone can decode it, so it hides nothing.

Why is Base64 bigger than the original?

Every 3 bytes become 4 characters, so the output is about 33% larger, plus up to two = padding characters.

What's URL-safe Base64?

A variant (RFC 4648 §5) that uses - and _ instead of + and /, usually without = padding, so it can go in URLs and file names. JWTs use it.

Is what I paste sent to a server?

No. This tool runs entirely in your browser with JavaScript and the built-in Web Crypto API. Nothing you type, paste or open is uploaded or stored.

Related calculators