Base64 Decoder
Decode Base64 strings and Data URIs back into previewable, downloadable files – securely in your browser.
Why Use This Tool?
When debugging API responses, inspecting database records, or extracting embedded images from HTML and CSS files, you often encounter long Base64 strings that aren’t human-readable. Our free Base64 Decoder instantly reconstructs and previews images or text from Base64 strings so you can inspect and download the original file. Paste a whole HTML or CSS snippet and every embedded image is found and decoded.
Because decoding happens entirely inside your browser’s local memory, sensitive API tokens and encoded payloads never leave your computer.
How to Use This Tool
4 Quick StepsPaste Base64 String
Paste your raw Base64 string, complete data:image/…;base64, URI, or HTML and CSS with embedded images.
Decode Content
The tool decodes as you paste and detects the real image or text format from the data itself.
Preview Output
View the rendered image preview, dimensions, and file type (or decoded plain text) right on the page.
Download or Copy
Download the reconstructed file, save an image as PNG, copy decoded text, or send the image on WhatsApp.
Base64 Decoder
Paste Base64, a Data URI, or HTML and CSS with embedded images. See the image or text instantly, then download it.
Need to go the other way? Use the Image to Base64 Encoder to turn an image into a Base64 string.
Found this useful?
How to Identify What a Base64 String Contains
Base64 encodes data using 64 characters: A-Z, a-z, 0-9, plus + and /, with = used as padding at the end. A Data URI adds a short prefix that names the file type, so browsers can display the data directly. Even without a prefix, the first few characters of a Base64 string usually reveal the file type, because every format starts with its own fixed signature.
| File Type | Data URI Prefix | Raw Base64 Starts With |
|---|---|---|
| PNG | data:image/png;base64, | iVBORw0KGgo |
| JPEG / JPG | data:image/jpeg;base64, | /9j/ |
| GIF | data:image/gif;base64, | R0lGOD |
| WebP | data:image/webp;base64, | UklGR |
| SVG | data:image/svg+xml;base64, | PHN2Zy or PD94bWw |
| data:application/pdf;base64, | JVBERi0 | |
| Plain text | data:text/plain;base64, | Varies by content |
Common Decoding Messages and How to Fix Them
If a string does not decode the way you expect, the message on screen tells you why.
| Message | What It Means |
|---|---|
| Not valid Base64: it contains the character ... | The text has a character Base64 never uses, such as a space, ! or a quote. Remove anything that is not part of the string. |
| The image cannot be shown | The string was probably cut off while copying. Copy the full value again, including the end. |
| The prefix says one type, but the data is another | The Data URI label is wrong. The decoder uses the real type, so your download still works. |
| Missing = padding was added | Some systems drop the = at the end. The decoder adds it back automatically. |
Frequently Asked Questions
Quick answers to common questions about decoding Base64 strings and Data URIs.
What is Base64 decoding?
Base64 decoding converts Base64-encoded text back into its original data, such as an image file or readable text. Base64 itself is a way of representing binary data using only letters, numbers, and a few symbols so it can travel safely in text formats like JSON, HTML, and email.
How do I convert a Base64 string to an image?
Paste the Base64 string or full Data URI into the Base64 Decoder. The image preview appears instantly, then click Download to save the image file to your device.
Do I need to include the data:image prefix?
No. You can paste either a raw Base64 string or a complete Data URI such as data:image/png;base64, followed by the encoded data. The decoder detects the underlying format either way, from the data itself.
Can I paste HTML or CSS that contains Base64 images?
Yes. Paste a whole HTML snippet, CSS file or JSON response and the decoder finds every embedded Data URI in it, then shows and decodes each image separately.
Why is my Base64 string not decoding?
The most common causes are an incomplete string that was cut off while copying, extra quotation marks or spaces around the string, or text that was never Base64 encoded. Copy the full value again and paste it without surrounding quotes. The decoder tells you which character is not valid Base64.
What if the Data URI says the wrong file type?
The decoder checks the actual bytes of the file, not just the prefix. If a Data URI says image/jpeg but the data is really a PNG, you see a note and the download gets the correct .png extension.
Can it decode URL-safe Base64 or Base64 without padding?
Yes. URL-safe Base64, which uses - and _ instead of + and /, is decoded automatically, and missing = padding at the end is added for you.
Can I decode Base64 to text or JSON?
Yes. When the decoded data is text, it is shown on the page, and JSON is formatted so it is easy to read. You can copy it or download it as a file.
Why is Base64 data larger than the original file?
Base64 represents every 3 bytes of data with 4 text characters, so encoded data is roughly 33% larger than the original file. Decoding restores the file to its original size.
Can I send the decoded image on WhatsApp?
Yes. On phones and on computers that support sharing, the WhatsApp button shares the decoded image directly, so you just pick a chat. On other computers, the image is downloaded and WhatsApp opens, ready for you to attach it.
Is it safe to decode sensitive Base64 data with this tool?
Yes. The Base64 Decoder runs entirely in your browser, so your strings, tokens, and decoded files are never uploaded to a server. The tool is also free with no signup.
Related Free Tools
These free tools work well alongside the Base64 Decoder. Like this one, they all run privately in your browser.