Base64 Tools

Input Text
Output
Input bytes: 0Output bytes: 0
Options
URL-safe
Padding
Wrap 64

Base64 Encoder & Decoder — Text & File

Fast, reliable Base64 utilities for everyday development. Encode plain text or files to Base64, decode Base64 back to text or binary, handle URL-safe variants, optional padding, and line wrapping. Works entirely in your browser for privacy.

What you can do

  • Text ⇄ Base64: Convert UTF-8 text to Base64 and back.
  • File → Base64: Turn any file into a Base64 string for embedding or transport.
  • Base64 → File: Decode to binary; optionally treat output as PNG or JPG for quick preview.
  • URL-safe: Switch between standard and URL-safe forms (+//-/_).
  • Padding & Wrap: Keep/remove = padding and wrap lines at a fixed column (e.g. 64).
  • Data URL: Paste full data:*;base64, strings—the tool extracts the payload automatically.
  • Local processing: Everything runs client-side; no uploads, no servers.

How to use

  1. Text Encode: Paste text → choose URL-safe/padding/wrap → Run → copy or download .b64.txt.
  2. Text Decode: Paste Base64 (or a data URL) → optionally ignore whitespace / URL-safe input → Run.
  3. File Encode: Select a file → adjust options → Run → get Base64 string.
  4. File Decode: Paste Base64 or drop a text file → (optional) “I believe this is an image” and pick PNG/JPG → preview or download.

Tips & troubleshooting

  • Invalid characters: Enable “Input may be URL-safe” when decoding strings that use - and _.
  • Missing padding: Some Base64 omits =. The decoder auto-repairs padding, but you can force keep/remove on encode.
  • Whitespace: Enable “Ignore whitespace” to accept wrapped or spaced Base64.
  • Data URLs: The tool strips the header (e.g. data:image/png;base64,) for you—paste as is.
  • Binary output appears garbled: That’s expected in the text box; use Download to save the decoded binary.
  • Large inputs: Browser memory limits apply. For very large files, prefer chunking outside the browser.

FAQ

What is Base64? A binary-to-text encoding that represents bytes using 64 ASCII characters. Common in HTTP, MIME, JWT, and embedding assets.

What is URL-safe Base64? A variant replacing +- and /_; padding may be omitted.

Do I need padding? Many parsers accept unpadded strings; some standards still require it. Toggle as needed.

Is processing private? Yes. All work happens locally in your browser; no data is sent anywhere.

Use cases

  • Embed small images or fonts as Base64 in CSS/HTML.
  • Move binary blobs through systems that only allow text.
  • Quickly inspect or repair Base64 from logs and APIs.

Examples

"Hello"SGVsbG8= (standard) / SGVsbG8 (no padding) / SGVsbG8 (URL-safe is identical here)

Data URL: data:image/png;base64,<...> → paste directly into Text Decode or File Decode.