Base64 Encoder

Encode Mode

Batch Input

0 Items

1 Output lines

0 Output chars

Explore Our Tools

Workflow & Usage

  1. Choose a mode: Encode (text → Base64) or Decode (Base64/data URL → text).
  2. Single or Batch:
  • Single: Treat the whole textarea as one input.
  • Batch: One item per line; optional Trim lines for cleaner processing.
  1. Options (Encode):
  • URL-safe (+-, /_)
  • Strip padding (remove trailing =)
  • Wrap @ 76 (insert newlines every 76 chars)
  1. Paste or type. Output updates live.
  2. Copy output with one click.

At the top, badges show mode, input type, items, output lines, and output chars so you can sanity-check results at a glance.

Use Cases

  • Quick dev utilities Prepare URL-safe tokens, basic auth payloads, or embed small strings in JSON/HTML.

  • Email/MIME work Wrap at 76 chars to meet legacy MIME expectations or strip padding when systems require it.

  • Data URL triage Paste data:*;base64,… strings to decode the payload text instantly.

  • Batch transforms Convert many items at once - one per line - for docs, test fixtures, or CMS migrations.

Tips for Best Results

  • Know your charset. This tool assumes UTF-8. If your source uses another encoding, convert it to UTF-8 first.
  • Use URL-safe when embedding in URLs. Avoid escaping by toggling the URL-safe option.
  • MIME wrap only when needed. Most modern APIs don’t require line wrapping; keep Base64 unwrapped for compactness.
  • Batch carefully. Each line is treated as a separate item; enable Trim lines to avoid accidental blanks.

How It Works

Everything runs client-side using standard browser APIs:

  • UTF-8 conversions via TextEncoder/TextDecoder for reliable text handling.
  • Manual Base64 codec implemented for predictable behavior and URL-safe normalization.
  • Data URL awareness - the decoder strips the data:*;base64, prefix automatically.
  • Whitespace tolerant decoding; line breaks and spaces are ignored.
  • No network calls - the entire transform happens in memory, instantly.

Frequently Asked Questions

Yes. Paste a full data URL like `data:image/png;base64,iVBOR…` and the decoder will automatically extract the Base64 segment before decoding.

It replaces `+` with `-` and `/` with `_` so the output is safe in URLs and filenames. You can also decode URL-safe inputs - the tool detects and normalizes them automatically.

Yes. Use Strip padding to remove trailing `=` and Wrap @ 76 to break lines at 76 characters (common for MIME).

This tool targets UTF-8 text. It encodes text to Base64 and decodes Base64 back to text. For arbitrary binary, paste a data URL to view its text representation; raw binary saving isn’t supported yet.

No. The decoder ignores whitespace. In batch mode, the app treats each line as one item.

No. Everything runs locally in your browser. Nothing leaves your device, and it works offline once loaded.

Read More From Our Blog