Base64 Decode and Encode Online

Base64 decode and encode in one free converter tool: decode Base64 to text, JSON, JWT, images and files (people often say decrypt, but Base64 is not encryption), diagnose and repair broken input, and see what was checked, or encode text back. Charset and layers are detected for you, with private AI explanations when you ask.

AI explain · private Free Decoded locally
Your input0 chars
Input
Paste or type here
Paste or type Base64 here …or anything that contains it: a JWT, a log line, a data: URI, a Kubernetes Secret. Tip: press Ctrl V anywhere on the page, or drop a file onto it.
Have a file?Drop it anywhere, or open it here. Images, PDF, any file. Nothing is uploaded.
Paste anywhere · Ctrl Enter copies the result
Result
How it works, and questions

Base64 decode examples

Synthetic sample inputs (not real credentials) for Base64 decode and encode, and what DecodePad makes of them. Open any of them in the tool above.

Everything this Base64 decoder and encoder does 66 features

The full feature list of this online Base64 converter, grouped by what you are trying to do. Base64 decode and encode share one input, and everything is detected automatically. For step-by-step instructions, see the visual guide.

Figure 1. One paste, two layers peeled, JSON out, in nine seconds. The clip is drawn and recorded in your browser.

Takes Base64 input in any shape

7 features
Live
"eyJ1c2VyIjoiYWRhIn0\u003d"
data:text/plain;base64,SGk
quotes removed\u003d → =padding fixed
Live decoding
Results appear as you type. There is no Decode button to press.
Paste anywhere
Ctrl+V anywhere on the page goes straight into the decoder.
Drop a file
A Base64 text file is decoded. A binary file switches to Encode.
Messy pastes cleaned up
Quotes, spaces, line breaks, data: prefixes, %3D and \u003d escapes are removed or fixed.
Padding repaired
Missing or extra "=" is fixed, and padding in the middle is read as joined chunks.
Base64URL handled
The - and _ alphabet used by JWT and OAuth is accepted without a switch.
Share by link
A #input= link opens with your data. Fragments never reach a server.

Decodes Base64 to text in any charset

4 features
Live
Other toolsÄãºÃ£¬ÊÀ½ç£¡GBK · detected你好,世界!
GBK1.15
Big50.75
Windows-12520.40
Charset auto-detect
UTF-8, UTF-16 LE/BE, GBK, Big5, Shift_JIS, EUC-KR, Windows-1251 and 1252.
Says what it picked
The detected charset is named, with a warning when it is unsure.
Manual override
Pick any charset under Options, and switch back to auto in one click.
PowerShell scripts
UTF-16 LE -EncodedCommand payloads are recognised and shown as text.

Peels nested and compressed Base64

4 features
Nested Base64
Base64 inside Base64 is decoded again, up to ten layers.
Hex, URL encoding, data URIs
Recognised as layers and unwrapped automatically.
gzip, zlib and raw DEFLATE
H4sI… strings and SAML redirect payloads are decompressed.
Clickable path
Every layer stays visible, and you can open any step as text or hex.

Converts Base64 to images and files

7 features
A PNG decoded from Base64 in this page89 50 4E 47 0D 0A 1A 0A
= PNG image
saved as .png ✓
30+ file types from their bytes
PNG, JPEG, GIF, WebP, SVG, PDF, ZIP, DOCX, MP3, MP4, fonts, executables and more, with or without a data: prefix.
Previews
Images, PDFs, audio, video and fonts are shown in place.
Correct file extension
Downloads are named .png, .pdf, .zip and so on, never .txt.
Type mismatch warning
You are told when a data: URI claims one type but the bytes are another.
Image tools
Save as PNG or WebP, or copy a data URI, CSS or an HTML image tag.
"This is not text"
Unreadable bytes are explained by entropy and size (hash, key, ciphertext) instead of printed as garbage.
Hex view
An offset / hex / ASCII dump for any result or layer.

Understands JWTs, keys and encoded formats

10 features
alg HS256⏰ Expired 2 hours ago
JWT inspector
Header, a claims table in your time zone, expiry status, an alg "none" warning, and HMAC signature checking.
HTTP Basic auth
The header is split into username and a hidden password.
PEM keys and certificates
Recognised, with a clear warning for private keys.
Email headers
MIME encoded-words like =?GB2312?B?…?= are decoded in their declared charset.
Links
URLs are shown as a safe card, with warnings for look-alike domains, raw IPs and "@" tricks. Nothing opens automatically.
Proxy subscriptions
vmess, ss, trojan and vless links are listed as a table, with credentials hidden.
JSON tree
Collapsible, with timestamps translated. Click any value to copy it.
XML and HTML
Shown as highlighted source, and SAML messages are named.
Magnet links
Name, info hash and tracker count, without opening anything.
Java serialized objects
rO0AB… payloads are named, with a warning not to deserialize untrusted data.

Decodes Base64 in logs, configs and lists

4 features
Live
data:
username: YWRtaW4=
password: czNjcjN0LVBA
host: ZGIuaW50ZXJuYWw=
username → adminpassword → s3cr3t-P@ 🔐host → db.internal
Base64 inside logs and configs
Every value in a log line, YAML, JSON or Kubernetes Secret is found, labelled with its key and decoded in place.
Lists, one per line
Told apart from a wrapped block, and decoded row by row.
One bad row doesn't break the rest
Failed rows are marked, and you can show only those.
Export
Copy everything as key = value, or download a CSV.

Fixes invalid Base64

7 features
…dGhpcyBpcyBhIHRlc3Q#IG1lc3Nh…
🪄 Smart repair & extractposition 29
Exact error position
Each invalid character is located and can be selected in the input.
Truncation check
Data that was cut off when copying is detected.
Partial decode
The valid part before the problem is still shown.
"This is really Hex / Base32"
Other encodings are spotted and decoded with the right codec.
"Did you mean Encode?"
Plain text pasted by mistake is recognised.
Smart repair
Removes surrounding text and stray characters, unescapes, finds a missing or extra character, and fixes padding. Ctrl+Z restores your original.
Deep unwrap
Tries reversed strings, ROT13, Base32, hex and raw DEFLATE on data that is still unreadable.

Encode, convert and export

4 features
PythonNode.jsShell
import base64, gzip
raw = base64.b64decode(data)
raw = gzip.decompress(raw)  # layer 2
print(raw.decode("gbk"))
Code from the detected path
Python, Node.js and Shell that repeat exactly what was decoded.
JSON to TypeScript or CSV
Interfaces generated from the data, or a CSV for arrays.
Use as input
Send a result back into the decoder for another pass.
Encode, too
Text or files, UTF-8 / UTF-16 / Latin-1, URL-safe, no padding, 76-column wrap, line by line, or data: URI.

Explains decoded data with private AI

8 features
✨ What this isA login token for Ada (admin). It expired 2 hours ago.Built-in rules · offline
password: s3cr3t-P@ss<SECRET>
email: ada@example.com<EMAIL>
Explain
A one-sentence summary in plain words, e.g. who a JWT belongs to and when it expired.
Security check
Flags malware-style scripts, XSS payloads, redirect links, unsigned tokens and executables.
Extract
Pulls out every email, URL and IP address.
Read text in images (OCR)
For decoded images. On-device first; the image is only sent if you confirm.
Analyze error
For decoded logs and stack traces: what went wrong and where to look.
Rules first, AI when you ask
Built-in rules answer instantly. Your browser's on-device model is next. A cloud model is used only on click.
Redacted before sending
You see exactly what would be sent. Private keys and passwords are never sent.
Secret warnings
Keys, tokens and password fields in the output are flagged.

A free online tool that keeps your data yours

6 features
0network requests
since you opened this page
🛡 connect-src 'none'Online · works offline
Decodes in your browser
Your input is not uploaded while you decode.
Enforced by the browser
The page's security policy blocks network connections (connect-src 'none').
Live request counter
The header counts the requests the page makes after it loads. It stays at 0 while you decode, and goes up only if you click Send feedback or Send to AI.
Works offline
Disconnect and keep decoding.
No ads, no pop-ups
Nothing between you and the result.
Feedback without your data
Two taps to tell us what went wrong. Your input is never attached.

Works online, offline and on any device

5 features
Result on the first screen on phones
The output sits right under the input, and the page scrolls to it after you paste.
Keyboard shortcuts
Ctrl+Enter copies the result. Ctrl+Shift+E switches between Decode and Encode.
Large pastes
Megabytes of Base64 decode in a fraction of a second, measured on your device in Figure 4.
Dark mode
Follows your system setting.
Examples
16 real inputs you can open with one click.

Why this Base64 converter works this way

The design follows from three observations. The numbers are either measured in your browser or come from a public source named under each figure.

Figure 2. Share of views among four common Base64 failure questions on Stack Overflow (2.5 million views in total). Each one is now handled automatically: file detection, padding repair, format detection and charset detection. Source: view counts from the Stack Exchange API on 27 Nov 2026, rounded to the nearest thousand (questions 16245767, 2941995, 8571501, 30106476).
Figure 3. Byte-value distribution of text, gzip and random data, computed in your browser just now () from about 24,000 characters of generated English-like text, the same text gzipped, and random bytes from your browser; 32 bins. Your input is not used. Text uses a narrow band of values and the other two spread evenly. That is how the decoder can say "this is not text".

Measuring on this device…

Figure 4. Decode time against payload size, measured on this device when the chart appeared (lower is better), using generated JSON from 16 KB to 4 MB. Your input is not used, and the numbers depend on your device. Detection and layer peeling cost a little more than a bare atob(), and the work never leaves your machine.

Is Base64 encrypted? Privacy, decryption and AI

Base64 is not encrypted: it is a reversible encoding, so to "decrypt" Base64 you only need to decode it. The standard that defines it says so plainly:

"The Base 64 encoding is designed to represent arbitrary sequences of octets in a form that allows the use of both upper- and lowercase letters but that need not be human readable."

Decoding is plain arithmetic, so DecodePad always runs it in your browser. The page's security policy blocks network connections, and you can check that in your browser's developer tools or by going offline.

AI is only used for questions that rules can't answer well, such as "what is this, and is it safe?". It works in three steps, and you choose how far to go:

StepRuns onSees
Built-in rulesThis tabEverything. Nothing leaves the page
On-device modelYour browser's own model, if it has oneEverything. Nothing leaves the device
Cloud modelOnly after you click SendA summary with secrets replaced, shown to you first. Private keys and passwords are never sent

This is what redaction does to a decoded config (synthetic demo data, not real credentials) before anything could be sent:

Decoded
user: ada@example.com
password: s3cr3t-P@ssw0rd
host: 10.0.4.17:5432
token: eyJhbGciOiJIUzI1NiJ9.eyJzdWIi…
What a cloud model would see
user: <EMAIL>
password: <SECRET>
host: <IP>:5432
token: <JWT>

Free online Base64 tools compared

How DecodePad compares with the main decode page of other free Base64 decode and encode tools, tested in a browser on 27 November 2026.

FeatureThis toolbase64decode.orgbase64.guruCyberChefjam.dev
Your input stays in the browser when you decode✓✗ sent to server✗ sent to server✓✓
Live decoding as you type✓opt-in (Live mode)✗ button✓✓
Charset: automatic, and tells you which✓manual, auto-detect optionauto (experimental) or manualmanual (Decode text)✗ UTF-8 only
Image preview in the same box✓not checkedseparate pagevia recipe (Render Image)separate page
Several values, one per line✓checkbox✗not checked✓
Nested gzip peeled automatically✓not checked✗manual (Gunzip, Magic)✗
JWT split into header and claims✓not checked✗manual (JWT Decode)decoded as plain text
Explains invalid input✓ position + repairnot checkedpartly (warns, decodes anyway)not checkedgeneric error
Result visible on a phone's first screen (375 × 667)✓not checked✗✗✓

How we checked: on 27 November 2026, in Chrome, we decoded the same test strings (text, GBK text, gzip inside Base64, a JWT, a PNG, two values on two lines, an invalid string) on each tool's main decode page and recorded every network request. “Sent to server” means the input appeared in a request when we pressed Decode. ✗ means the feature was not available on that page; “not checked” means we did not test that feature (base64decode.org blocks automated browsers after the first request). This compares these pages only, not everything each product offers. Pages checked: base64decode.org, base64.guru/converter/decode, CyberChef, jam.dev Base64 encoder. Spotted an error? Email support@decodepad.com.

Base64 decode and encode FAQ

What does Base64 decode and encode mean?

Encoding turns any bytes (text, images, files) into 64 safe characters so they can travel inside email, JSON, URLs or HTML. Decoding turns those characters back into the original bytes. The format is defined by RFC 4648; DecodePad does both directions in your browser.

Is Base64 encryption? Can I decrypt Base64?

No, Base64 is an encoding, not encryption. Anyone can decode it, and "decrypting" Base64 simply means decoding it, which this tool does instantly. If the bytes underneath are really encrypted, DecodePad tells you the result is not text instead of showing garbage, because only the key can turn ciphertext back into data.

Is it safe to paste passwords, tokens or keys?

Yes. Decoding happens in this browser tab and your input is not uploaded. The page's security policy (connect-src 'none') makes the browser refuse fetch, XHR, WebSocket and beacon connections. The only exceptions are when you click Send feedback or Send to AI, and the request counter shows each one. You can confirm it in DevTools or by going offline.

Why do other decoders show garbage like �

Because they assume the bytes are UTF-8 or Latin-1. This tool tests several charsets (GBK, Big5, Shift_JIS, UTF-16…), picks the most likely one, and shows you which it picked.

What if the result isn't text?

Then you're told so. Known file types are previewed and can be downloaded with the right extension. Unknown binary data is shown as a hex dump, with a guess at what it is (encrypted, compressed, hash…).

What's the difference between Base64 and Base64URL?

RFC 4648 is explicit that they are different alphabets: "This encoding should not be regarded as the same as the "base64" encoding and should not be referred to as only "base64"." (RFC 4648, section 5). Base64URL uses - and _ instead of + and /, and often drops the = padding. Both are accepted automatically; the result panel tells you which one it was.

Can this Base64 translator handle images and files?

Yes. It works as a translator in both directions: Base64 to text, images, PDFs and other files, and text or files back to Base64. Files are recognised from their bytes and saved with the correct file extension.

Why does Base64 end with = signs?

The = is padding that makes the length a multiple of four. The standard explains when it is needed: "In some circumstances, the use of padding ("=") in base-encoded data is not required or used. In the general case, when assumptions about the size of transported data cannot be made, padding is required to yield correct decoded data." (RFC 4648, section 3.2). DecodePad adds or removes it for you.

How do I decode Base64 to an image?

Paste it. A data:image/… prefix is optional, because the format is detected from the bytes. Download it, convert it to PNG or WebP, or copy it as a data URI or CSS.

Guide

How to use the DecodePad Base64 decoder

A six-minute visual guide to decoding and encoding Base64 online, with screenshots and a short video.