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.
tool / encoding
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 toolsEncode 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.
+ and /, padded with =. Default for most APIs and data URIs.+→- and /→_, no padding. Safe for query strings and JWT tokens.
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.
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.
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.
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.
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
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