Images
PNG, JPEG, GIF and WebP data URIs and bare payloads render straight to a preview, with the mime type and byte size printed next to them.
Base64 decoder · browser only
Paste a Base64 string and see what it really is — text, an image, a PDF, a JWT or a ZIP. If the string is broken, this tool points at the exact character, explains the usual cause and repairs it in one click.
Every decoder on the first page can turn a string into text. Almost none of them tell you why the string was rejected, or show you what the bytes actually are.
A space inside a copied string, a missing =, a - where the standard alphabet expects +: each of these fails the same vague way everywhere else. Here the ruler under the input counts the characters and reports the first offending position, so you know whether to strip whitespace, switch to the URL-safe alphabet or restore padding.
Decoded Base64 is often a PNG screenshot, a PDF invoice, a JWT or a zipped archive, not a sentence. This tool sniffs the magic bytes and renders an image, a PDF frame or a decoded token with its header and claims split into readable JSON.
Decoding runs on the browser's own Base64 and TextDecoder APIs. Strings you paste are not sent to a server, not logged and not queued for a worker — which matters when the payload is an access token, a customer record or an internal document.
Detection is based on the first bytes of the decoded output, not on the file name.
PNG, JPEG, GIF and WebP data URIs and bare payloads render straight to a preview, with the mime type and byte size printed next to them.
A payload starting with %PDF opens in an embedded viewer, and the download button hands you the real file rather than a renamed text blob.
Three URL-safe segments are split into header, payload and signature, with the JSON pretty-printed and the expiry rendered as a readable date.
UTF-8, GBK, Shift_JIS, EUC-KR, ISO-8859-1 and UTF-16 LE. If the output looks like mojibake, switch the encoding instead of guessing.
Drop in the string from a log, an API response, an email source or a data URI, or load a file to encode it the other way.
The line under the input reports length, padding and alphabet. When decoding fails, it says where and offers a one-click fix.
Text goes to the clipboard, images and PDFs open in place, binaries come back as a real file with the right extension.
Base64 is not encryption, and it is not compression. It is a way of spelling arbitrary bytes with 64 printable characters so that binary data can travel through systems that only accept text: HTTP headers, JSON fields, email bodies, data URIs and database columns. Decoding reverses that spelling and gives you the original bytes back — sometimes a sentence, very often a file.
That is why a decoder that only prints characters is half a tool. A PNG screenshot decoded as text is unreadable, a PDF comes out as noise, and a JWT is unreadable until its header and claims are parsed. This page checks the first bytes of the output and shows the payload the way it was meant to be seen.
Almost every rejected string fails for one of three reasons, and they all produce the same unhelpful error in most tools.
Line breaks and spaces. Strings copied out of a terminal, an email client or a PDF arrive wrapped across several lines. Base64 ignores whitespace in principle, but many decoders reject it outright. Stripping whitespace is the first fix here, before anything else is tried.
Missing padding. A Base64 string has to be a multiple of four characters long; the encoder pads the tail with = signs. Copy a string without its trailing = and the length no longer divides by four. The tool reports how many characters are missing and can restore them for you.
The wrong alphabet. Standard Base64 uses + and /. The URL-safe variant replaces them with - and _ so the value can sit inside a URL or a filename, and it usually drops the padding. If you decode a URL-safe string with a standard decoder you get an error at the first -; the fix is to translate the alphabet rather than to edit the string by hand. The alphabet selector here does that translation and the ruler under the input tells you which alphabet your string appears to use.
There is a fourth, quieter failure: the string is valid Base64, but the bytes are not the character encoding you assumed. Chinese, Japanese and Korean text encoded in GBK, Shift_JIS or EUC-KR decodes into mojibake when read as UTF-8. Switch the text encoding instead of re-copying the string.
API responses and debug logs are the most common case: a field that should hold an object arrives as a long opaque string. JWT access tokens are Base64url in their first two segments. Inline image sources in HTML and CSS use data URIs. Email attachments and raw message sources are Base64. Basic authentication headers are Base64 of user:password. Android and iOS crash reports, Kubernetes secrets and signed cookies are all Base64 as well.
In each of those cases you need the same two things: the original bytes, and a hint about what those bytes are. Paste the string above and both appear in the same tab, without the payload ever leaving your browser.
The decoding runs in your browser with the built-in Base64 and TextDecoder APIs. Nothing is sent to a server, so a pasted token is never uploaded or logged. You can confirm it by opening the network panel and decoding with the connection turned off.
Base64 encodes three bytes into four characters. When the input is not a multiple of three bytes, the encoder pads the tail with = signs so the length stays a multiple of four. One = means one byte short, two means two. The padding carries no data and can be restored automatically.
It is the same encoding with two characters swapped: + becomes - and / becomes _, and the padding is usually dropped. It exists because + and / have meanings inside URLs and filenames. JWTs, cookies and API keys often use it. The alphabet selector here detects and converts it either way.
The bytes were decoded correctly but read with the wrong character encoding. UTF-8 cannot represent GBK, Shift_JIS or EUC-KR bytes, so they turn into replacement characters. Pick the text encoding the source used and the same bytes read back as readable text.
Yes. When the decoded bytes start with a known signature (PNG, JPEG, GIF, WebP, %PDF, ZIP or gzip) the tool renders a preview or offers the real file as a download, instead of showing binary data as text.
Paste a three-part token and the header, payload and signature are split and the two JSON segments are pretty-printed, with the expiry date converted to a readable timestamp. The signature is not verified, because that requires the issuer's key.