json.

Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 back to text โ€” entirely in your browser.

Processed locally in your browser โ€” never uploaded.

Input

Output

What is Base64 encoding?

Base64 is a binary-to-text encoding scheme defined in RFC 4648. It represents arbitrary data using 64 printable ASCII characters (Aโ€“Z, aโ€“z, 0โ€“9, +, /), which makes it safe to embed in places that only accept plain text โ€” email attachments, data URIs in CSS or HTML, JSON payloads, and auth headers.

Base64 works by grouping input bytes into chunks of three (24 bits) and mapping each 6-bit segment to one of the 64 characters in the RFC 4648 alphabet. When the input length isn't a multiple of three, the output is padded with one or two = characters โ€” for example, encoding M produces TQ==, while Ma produces TWE=. This 4:3 ratio is why Base64 text is always about 33% larger than the original data. Standard Base64 uses + and /, which are unsafe in URLs and filenames; the URL-safe variant (RFC 4648 ยง5) swaps them for - and _and often omits padding โ€” a common source of "invalid character" errors when a URL-safe string is pasted into a standard decoder.

  • Embed small images or fonts as data: URIs directly in CSS or HTML, without a separate file request
  • Encode binary attachments for transport inside JSON or XML payloads that only support text
  • Build or inspect Basic Auth headers (Authorization: Basic ...) while debugging an API

Also try the JSON formatter, JSON validator, JSON minifier, or JSON viewer.

Base64 Encoder / Decoder FAQ

Is Base64 encoding the same as encryption?
No. Base64 is a reversible text encoding, not encryption โ€” anyone can decode it instantly with no key or password. Never use Base64 alone to protect sensitive data.
Why does my Base64 string end with = signs?
Base64 groups input into 3-byte chunks. When the input length isn't a multiple of three, one or two = characters pad the last group so the output length stays a multiple of four.
Why do I get an error decoding a Base64 string from a URL?
URLs often use the URL-safe Base64 variant, which replaces + and / with - and _ and may omit padding. Paste it as-is; standard decoders that expect + and / will reject it.
Is my text uploaded when I encode or decode?
No. Encoding and decoding run locally in your browser using the native Base64 implementation. Nothing is sent to a server.