Base64 Decoder, Decode to Text or File, Unicode-Safe
Paste Base64 and get the original back the instant you do. Standard and URL-safe input are detected for you, UTF-8 text decodes without mojibake, and when the payload is really a PNG, PDF or ZIP the tool recognises it and hands you a download. 100% in your browser. No uploads, no limits.
What is the base64 decoder?
Decoding Base64 back to its original form, the Base64 Decoder recovers UTF-8 text without mojibake and auto-detects both standard and URL-safe input, including JWT segments and data URLs. When the payload is a PNG, PDF, ZIP or similar binary, it sniffs the type and offers a download. Free and fully in-browser. Nothing is uploaded.
The GigAI Base64 Decoder turns Base64 back into whatever it originally was: the moment you paste it, with no 'Decode' button to find. It recovers the raw bytes with the browser's atob and then decodes them as UTF-8 through TextDecoder, so text that was encoded correctly comes back exactly as it went in: emoji, curly quotes, accented characters and CJK all survive instead of turning into � boxes. It auto-detects the alphabet, transparently accepting both classic Base64 (with + / and = padding) and URL-safe Base64URL (with - _ and no padding), including JWT segments and data-URL payloads you paste in whole. When the decoded bytes clearly aren't text (a PNG, JPEG, GIF, PDF, ZIP, GZIP or WebP) the decoder sniffs the file's magic-number signature, tells you the detected type, and offers a one-click download with the right extension instead of flooding the pane with control characters. Invalid input never fails silently: you get a precise, plain-English error pointing at what's wrong. Everything happens locally in a dependency-light path, your Base64 and its decoded contents never leave the tab.
- Difficulty:
- Easy
- Typical time:
- ~15s
- Processing:
- 100% browser processing
Last updated
How to use the base64 decoder
- 1
Paste your Base64
Paste (Ctrl/Cmd+V) or type the Base64 into the input pane. You can also drop a.txt file containing Base64, or paste a full data: URL, the decoder handles it.
- 2
Let it auto-detect the format
Standard and URL-safe Base64URL are recognised automatically, so you don't have to know or set the alphabet. Missing padding is added for you.
- 3
Read the text or grab the file
If the payload is text it appears instantly in the output pane. If it's binary, the tool shows the detected type and a download button with the right extension.
- 4
Copy, download or share
Copy the decoded text with one click, download binary output as a file, or generate a shareable link that reopens with your exact input already loaded.
What Base64 Decoder includes
Instant, live decoding
The original text appears as you paste or type: there's no button to press and no reload. Edit the Base64 and the output updates in the same keystroke.
Auto-detects URL-safe input
Standard Base64 and URL-safe Base64URL are recognised automatically. Paste a JWT segment, a data-URL payload or a padded blob, the decoder normalises - _ and missing padding for you.
Genuinely Unicode-safe
Bytes are decoded as UTF-8 with TextDecoder, so emoji, accents, smart quotes and CJK return exactly as they were. Tools that assume Latin-1 mangle every multi-byte character. This one doesn't.
Detects binary, offers a download
When the bytes are really a PNG, JPEG, GIF, PDF, ZIP, GZIP or WebP, the decoder sniffs the signature, shows the detected type and gives you a one-click download with the correct extension.
Precise, honest errors
Malformed input never fails silently. You get a clear, specific message (bad characters, wrong padding, truncated data) so you know exactly what to fix.
100% private, in-browser
Your Base64 and its decoded contents are processed locally with the Web platform's own APIs. Nothing is uploaded, stored or logged, close the tab and it's gone.
Why use our base64 decoder
Reads what other decoders reject
URL-safe segments, unpadded strings, whole data: URLs and stray whitespace all decode here without hand-editing. You spend zero time massaging input into a 'valid' shape.
Text and binary in one place
The same paste box handles a config snippet, a JWT payload and an encoded PNG. Text renders inline. Binaries become a labelled, downloadable file. No guessing which tool to use.
Round-trips without data loss
Because decoding goes through UTF-8, whatever you decode matches what was originally encoded. No dropped emoji, no garbled accents, no silent corruption.
Private, free and unlimited
Everything runs in your browser tab with native APIs. Decode secrets, tokens and documents with no upload, no sign-up, no quota and no watermark.
Built for the way you work
From quick one-off fixes to daily workflows, see how people put this tool to use.
- Developer
Inspect an encoded payload fast
Drop in the Base64 from a config value, environment variable or API response to see the plain text it hides: without writing a throwaway script or opening a REPL.
- API & backend engineer
Recover an attachment or credential
Decode a Base64 field from a JSON body or header. If it's a file, download it directly. If it's a token or string, read it as UTF-8 text on the spot.
- Security & QA
Read JWT and token internals
Paste a URL-safe JWT segment to reveal its JSON claims, or decode encoded test fixtures to confirm they round-trip cleanly with the Base64 encoder.
- Designer & content
Turn a data URL back into an image
Paste a data:image/png;base64,… string and the decoder recognises the PNG, letting you download the original image file for editing or reuse.
Supported formats
Accepts Base64, Base64URL, Data URL and TXT, and produces Text (UTF-8) and Binary file (PNG, JPEG, GIF, PDF, ZIP, …), all processed locally in your browser.
- Base64
- Base64URL
- Data URL
- TXT
- Text (UTF-8)
- Binary file (PNG, JPEG, GIF, PDF, ZIP, …)
Frequently asked questions
Recommended tools
Base64 Encoder
Encode text or any file to Base64 instantly: Unicode-safe, with a URL-safe toggle and one-click data URLs. Runs entirely in your browser, nothing uploaded.
JWT Decoder
Decode and inspect any JSON Web Token instantly. Read the header, payload and signature, see when it was issued and expires, and optionally verify an HS256 signature. 100% in-browser. Your token never leaves your device.
JSON Formatter
Format, validate and minify JSON in your browser with pinpoint error line + column, jump-to-error, key sorting and live editing: nothing is uploaded.
YAML Formatter
Format, clean and re-indent YAML in your browser, or convert YAML ↔ JSON, with key sorting, flow/block style and the exact error line + column. Nothing is uploaded.
Add Page Numbers to PDF
Stamp page numbers onto a PDF in your browser. Pick the corner, choose a bare number or a 'Page X of Y' label, set the start number, font size and margin, and skip a cover page. Real selectable text, nothing uploaded.
Barcode Generator
Generate scannable 1D barcodes (CODE128, EAN-13, UPC-A, CODE39, ITF-14, MSI, pharmacode and Codabar) live in your browser, with per-format validation and PNG or SVG export. Nothing is uploaded.
Comparisons & guides
Go deeper on the concepts behind the base64 decoder.
Base64 vs Binary: When Should You Encode Your Data?
ComparisonBinary is the raw, compact form of data. Base64 is a text-safe encoding of it that's ~33% larger. Here's when encoding to Base64 helps and when it just wastes bytes.
Read the comparisonHow to Decode a JWT (Read Its Header & Payload)
GuidePaste a JSON Web Token and read its header and claims in plain JSON, inspect the algorithm, expiry and scopes while debugging auth. A safe, browser-only guide.
Read the guideCommon problems, solved
Hit a snag? Here are quick fixes for the issues people run into most.
It says my input isn't valid Base64.
Base64 only uses A–Z, a–z, 0–9 and + / (or - _ for URL-safe), plus optional = padding. Stray quotes, commas or a copied 'base64,' prefix without the data: scheme can break it: remove anything that isn't part of the encoded value and try again.
My decoded text has strange � characters.
Those replacement characters mean the bytes aren't valid UTF-8: often the data was encoded from Latin-1 or is actually binary. If it's a file, the decoder will usually detect it and offer a download instead. Otherwise the source encoding wasn't UTF-8.
I pasted a data URL and got binary, not text.
That's expected, a data:image/... or data:application/pdf URL contains binary bytes. The decoder strips the data-URL prefix, detects the file type and gives you a download rather than showing unreadable characters.
The output looks truncated or wrong length.
Base64 must be a multiple of four characters (padding aside). If part of the string was cut off during copy, the tail bytes can be lost, re-copy the complete value, including any = padding, and decode again.
Get the most out of it
You don't need to know whether input is standard or URL-safe: paste it and the decoder figures out the alphabet and padding for you.
Pasting a whole data: URL works. The decoder removes the data:<mime>;base64, prefix before decoding and uses the MIME hint for the download.
For binary results, use the Download button: copying control characters into another app rarely does what you want.
To decode a JWT's claims, paste just the middle segment (between the dots). It's URL-safe Base64 and decodes to the payload JSON.
Use the Share button to send a teammate a link that reopens the decoder with your exact Base64 already loaded.
What's new
Recent updates and improvements to the base64 decoder.
Launched the Base64 Decoder with live decoding, automatic standard/URL-safe detection, UTF-8 text output, copy/share and keyboard shortcuts.
Added binary detection via magic-number sniffing (PNG, JPEG, GIF, WebP, PDF, ZIP, GZIP) with one-click download and correct file extensions.
Improved data: URL handling, the MIME prefix is stripped automatically and used as a hint, plus clearer, more specific error messages for malformed input.
Keep exploring
Problems we solve
Definitions
From the blog
Explore categories
Compare formats
By file type
Common tasks
Your privacy is built in
Every byte is decoded locally in your browser using the platform's atob and TextDecoder APIs. Your Base64 and the text or file it decodes to are never uploaded, stored, logged or shared, nothing leaves your device, and closing the tab discards it all.
- Runs in your browser
- No uploads
- Nothing stored
Ready to try the base64 decoder?
Free, private and instant. Base64 Decoder runs right in your browser.