Base64 Image Encoder / Decoder
Convert images to Base64 strings for embedding in HTML, CSS, or JSON, or decode Base64 back to images. Everything runs in your browser — no upload, no account, no tracking.
No image selected
Click or drag image here
Supports JPEG, PNG, WebP, BMP, GIF
Base64 Encoding
Processed entirely in your browser. No data sent to any server.
How to encode images to Base64
- Drop or select your image file above
- The Base64 string is generated automatically
- Copy the string or the full data URI
- Paste it into your HTML img src, CSS background, or code
Frequently asked questions
When should I use Base64 for images?
Base64 is useful for small images (icons, logos) embedded in HTML emails, CSS, or single-file applications. It eliminates extra HTTP requests but increases file size by about 33%. Avoid it for large images.
What is a data URI?
A data URI combines the MIME type and the Base64 string into one string you can use directly:
data:image/png;base64,iVBOR.... Paste it into an img tag's src attribute.