Workflow & Usage
- Choose a mode: Encode (text → Base64) or Decode (Base64/data URL → text).
- Single or Batch:
- Single: Treat the whole textarea as one input.
- Batch: One item per line; optional Trim lines for cleaner processing.
- Options (Encode):
- URL-safe (
+→-,/→_) - Strip padding (remove trailing
=) - Wrap @ 76 (insert newlines every 76 chars)
- Paste or type. Output updates live.
- 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/TextDecoderfor 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.