How the format is detected
The tool decodes the Base64 and reads the first bytes of the file (the “magic number”): 89 50 4E 47 is PNG, FF D8 FF is JPEG, GIF8 is GIF, RIFF…WEBP is WebP. That means it shows the true type even when the data URI prefix is missing or wrong.
Troubleshooting
- “Invalid Base64 character” — the string was cut or contains extra characters such as quotes or
\nfrom a JSON field. Remove them or unescape first. - Not a recognised image — the data is a different file type, such as a PDF. Use the Base64 decoder, which can download any file.