tool / encoding

Base64 Encoder / Decoder

Encode text or files to Base64, or decode Base64 back to text, images, or downloadable files. Supports Standard, URL-safe, and MIME variants. Nothing leaves your browser.

← Back to tools
Input
Output

Encode vs Decode

Encode converts raw text or a binary file into a Base64 string safe for transport in JSON, URLs, or email. Decode reverses that — recovering the original text, image, or binary file from a Base64 payload.

Variants

  • Standard — uses + and /, padded with =. Default for most APIs and data URIs.
  • URL-safe — replaces +→- and /→_, no padding. Safe for query strings and JWT tokens.
  • MIME — inserts a line break every 76 characters. Required by email (RFC 2045) and some legacy systems.

How To Use

  • Select Encode or Decode mode at the top.
  • Choose Text for strings or File for binary files.
  • Pick a variant and (for decode) a charset.
  • Click Encode / Decode — output renders instantly.
  • Copy to clipboard or download the result.

Where You'll Actually Use This

Base64 shows up in more places than most developers expect. You're debugging an API response and there's an opaque blob in a JSON field — paste it here and find out if it's an image, a PDF, or garbled text. You need a small icon inlined as a data: URI in CSS — drop the file in and encode it. A webhook payload arrives with a URL-safe token and your language's decoder chokes on the missing padding — this tool normalizes URL-safe characters and re-pads automatically, so it decodes strings that a strict atob() call would reject. If you paste a full data URI, the data:image/png;base64, prefix is stripped for you.

Frequently Asked Questions

Is my data sent to a server?

No. Encoding and decoding both happen entirely in your browser. That matters here more than on most tools, because Base64 payloads often contain credentials, tokens, or private files.

Why did my decoded output show as an image?

The tool checks the decoded bytes for known file signatures — JPEG, PNG, GIF, WebP, and PDF. If it finds an image, it renders a preview instead of dumping binary noise into the text area, and the Download button saves the actual file.

What's the charset dropdown for?

Base64 encodes bytes, not characters, so decoding needs to know how those bytes map back to text. UTF-8 is right almost every time. Reach for Windows-1252 or ISO-8859-1 when you're decoding output from older systems and accented characters come out mangled.

Does Base64 compress data?

The opposite — it inflates it by roughly a third, which the stats panel shows you as the encode ratio. It's an encoding for safe transport, not a compression format.

// huntermussel

Need to automate data encoding across your pipelines?

HunterMussel builds intelligent automation workflows that handle encoding, transformation, and API integration at scale — so your team stops doing it manually.

Explore Intelligent Automation →

Advertisement · Publicidade