If you have a Base64 string and you need an actual image file, you do not need a custom script.
Start here:
- Open Base64 to Image.
- Paste your Base64 string or full data URL.
- Preview and download the image.
Textavia decodes Base64 locally in your browser.
Quick start: the two formats you will see
1) Full data URL (best)
It starts like this:
data:image/png;base64,iVBORw0KGgo...
A data URL includes the MIME type. The converter can auto-detect the format.
2) Raw Base64 only
It starts like this:
iVBORw0KGgo...
If you only have raw Base64, pick an image type in the tool (or leave auto-detect on and sanity-check the preview).
What Base64 is (and why images use it)
Base64 is a text encoding for binary data.
Images are binary files. When you need to embed an image inside HTML, CSS, JSON, or an API payload, Base64 is a common workaround.
Examples
Example 1 (beginner): convert a data URL to a PNG file
- Copy the full string starting with
data:image/.... - Paste it into Base64 to Image.
- Download.
Example 2 (professional): debug a broken <img src>
If an <img> tag shows a broken image icon:
- confirm the string starts with
data:image/if it is meant to be a data URL - confirm there is a comma after
base64
Correct:
data:image/webp;base64,AAAA...
Common bug:
data:image/webp;base64AAAA...
Example 3 (professional): fix URL-encoded Base64
Sometimes Base64 is sent through a query parameter and gets URL-encoded.
Signs:
- lots of
%2F,%2B, or%3D
Fix:
- URL-decode it with the URL encoder/decoder.
- Then decode the Base64 to an image.
Common Base64-to-image errors
| What you see | What it usually means | Fix |
|---|---|---|
| Preview is blank | wrong MIME type or corrupted Base64 | try a different type, or recopy the string |
| Error about invalid Base64 | whitespace or non-Base64 chars | remove spaces/newlines; recopy clean |
| Output downloads but won't open | you decoded Base64URL or non-image data | confirm it is image data; try the Base64 tool |
If you only do 3 things
- Paste the full
data:image/...;base64,...string when you have it. - If you only have raw Base64, verify the image type by previewing.
- If you see
%2Fand%3D, URL-decode first.
Sources and further reading
- RFC 4648: The Base16, Base32, and Base64 Data Encodings
- RFC 2397: The "data" URL scheme
Related tools
- Create data URLs with Image to Base64.
- Decode and encode text with the Base64 tool.
- Fix percent-encoding with the URL encoder/decoder.
Privacy and security
Textavia's Base64 decoding runs locally in your browser. Your data is not uploaded to a server.
