base64 encode / decode — browser-only
Plain text input
Base64 output
mode: encode
variant: standard
input: 0 chars
output: 0 chars
source: browser · nothing uploaded

Base64 Encoder & Decoder — Fast, Private, Browser-Only

b64chop encodes any text or file to Base64, or decodes Base64 back to plain text or binary. All processing happens in your browser using the native btoa/atob APIs and the FileReader interface — nothing is ever uploaded to a server.

What is Base64?

Base64 is a binary-to-text encoding scheme that represents binary data using 64 ASCII characters (A–Z, a–z, 0–9, +, /). It is used wherever binary data must travel through text-only channels: email attachments (MIME encoding), JSON and XML payloads, HTTP Basic Auth headers, JWT token segments, CSS data URIs, and HTML embedded images.

The encoding inflates size by approximately 33% — every 3 bytes of input become 4 Base64 characters. Padding = characters are appended to make the output length a multiple of 4. The URL-safe variant replaces + with - and / with _ so the output can appear in URLs and filenames without percent-encoding.

Features

  • Encode text → Base64 or decode Base64 → text
  • URL-safe Base64 (RFC 4648 §5) — replaces + and / with - and _
  • File input — load any file, get its Base64 representation
  • File download — decode a Base64 string and save the raw bytes
  • Swap panels to flip input and output instantly
  • Live status: input size, output size, validity check
  • Zero server requests — works offline after first load

Common Use Cases

  • Decoding a Base64-encoded JWT segment or claim value
  • Encoding an image or file for embedding in a JSON payload
  • Generating a Basic Auth header value (username:password → Base64)
  • Encoding configuration secrets for environment variables
  • Creating a data URI for a small image or font
  • Decoding a Base64 attachment from an email source

FAQ

Is my data sent to a server?

No. b64chop runs entirely in your browser. Nothing you paste or drop here is ever transmitted anywhere. You can load the page, then go offline — it will continue to work.

What is URL-safe Base64 and when do I need it?

Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 (RFC 4648 §5) replaces them with - and _, and typically omits the padding =. Use it for JWT tokens, URL parameters, file names, and anywhere the output appears inside a URL.

Can I encode binary files, not just text?

Yes. Click Load file to select any file from your device. b64chop reads it locally using the FileReader API and outputs the full Base64 encoding. No upload occurs.

How do I decode a Base64 string back to a file?

Switch to Decode mode, paste the Base64 string, then click download. b64chop decodes the bytes and triggers a file download. Name and MIME type are inferred from the content where possible.

Why does my Base64 look different from another tool's output?

The most common differences are: (1) URL-safe vs standard variant — check that both tools use the same mode; (2) padding — some tools strip the trailing = characters; (3) line breaks — some tools insert newlines every 76 characters (MIME convention) which b64chop does not.

How is b64chop different from base64decode.org or base64.guru?

b64chop is ad-free, loads instantly, and never touches a server. The incumbents process your data server-side and surround it with advertising. b64chop is also part of the -chop family alongside hashchop (SHA hashing) and jwtchop (JWT decoding) — consistent tools for the same developer workflow.