Base64 Image Viewer
Paste Base64 text or a data:image address. The picture is shown with its type, size and dimensions, and you can download it as a file.
このコンテンツは英語です。
計算例
A tiny PNG
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR4nGP4z8DwHwAFAAH/q842iQAAAABJRU5ErkJggg==
Picture type: PNG Base64 length: 96 characters Picture size: 70 bytes
The type comes from the first bytes of the data.
An SVG data address
data:image/svg+xml;base64, then a small SVG
Picture type: SVG Base64 length: 84 characters Picture size: 62 bytes
The prefix is accepted and the SVG is recognised.
Base64 Image Viewer について
This viewer turns Base64 text back into a picture. Paste the text, with or without the data:image prefix, and the picture is shown with its type, its dimensions in pixels, its size and the length of the Base64 text, and you can download it as a file. If the text is wrong, the message says whether it is incomplete, is not Base64 or decodes to something that is not a picture.
Pictures are often stored as Base64 inside web pages, stylesheets, emails, JSON responses and database fields, which makes them impossible to recognise by eye. The picture type is worked out from the first bytes of the data, so it is right even if the prefix says something different. PNG, JPEG, GIF, WebP, AVIF, BMP and SVG are recognised.
You can paste a whole data address, a whole url() value copied from a stylesheet, or just the raw characters. The variant that uses hyphens and underscores in place of plus and slash is accepted, and missing equals signs at the end are filled in. The download button saves the decoded picture with a file name that matches its type, such as image.png or image.jpg.
Base64 Image Viewer の使い方
- Paste the Base64 text, the whole data address or a url() value.
- Look at the picture, and at the type, size and dimensions underneath.
- If there is an error, check that the whole string was copied, with nothing cut off.
- Press Download picture to save it as a file.
主な使いみち
- Seeing what an embedded image in a stylesheet or an email looks like
- Checking a Base64 value from an API response or a database field
- Saving a picture that is stored as text back to a file
- Finding out how large an embedded picture really is before deciding to link to it instead
- Debugging a picture that does not display in a page, to learn whether the data is damaged
- Confirming the real format of an image whose data address claims a different one
よくあるご質問
Do I need the data:image prefix?
No. Plain Base64 text works, and the type is found from the data itself. A whole url() value from a stylesheet works too.
Why is there an error?
The text may be incomplete, contain characters that are not Base64, or decode to something that is not a picture this page can show. Very short strings are rejected as too small to be a picture.
Which formats are recognised?
PNG, JPEG, GIF, WebP, AVIF, BMP and SVG.
Why is the size different from the Base64 length?
Base64 writes every three bytes as four characters, so the text is about a third longer than the picture it holds. The size shown is that of the decoded picture.
How do I turn a picture into Base64?
Use the image to Base64 tool.