Encoding
Base64 and image
Turn an image into a Base64 data URI, or preview an image from Base64.
Private Everything on these pages runs in your browser. What you type is never sent to a server and nothing is stored.
Image to Base64
Base64 to image
Images up to 5 MB. The file is read by your browser and never uploaded.
How to use it
- Choose an image file, or paste a Base64 string or data URI.
- Copy the data URI to use in HTML or CSS, or copy the plain Base64.
- Check the preview to confirm the image decodes.
Example
Input
data:image/png;base64,iVBORw0KGgo...Result
A preview of the image and its sizeFrequently asked questions
Is my image uploaded?
No. The file is read by your browser and converted on your device.
When is a data URI a good idea?
For very small images such as icons, because it saves a request. Larger images grow by about a third in Base64 and cannot be cached on their own, so serve them as files.