Image to Base64
Convert an image to a Base64-encoded string for embedding in HTML, CSS, or JSON. Free and private. Your image is read locally and never uploaded.
Converts an image file into a base64-encoded data URL you can paste straight into HTML, CSS, or JSON, handy for embedding icons, inlining small images to cut HTTP requests, or pasting a logo into an email template or API payload.
How to use it
- Upload or drag in your image
- Copy the generated base64 string or full data URL
- Paste it into your HTML, CSS, or code
Frequently asked questions
- What's the difference between base64 output and a data URL?
- Base64 alone is just the raw encoded text. A data URL wraps it with a prefix like data:image/png;base64, so it tells the browser the file's MIME type and can be dropped directly into an <img src>, CSS background, or JSON payload.
- Why did my base64 string get so much bigger than the original file?
- Base64 encoding turns every 3 bytes of binary data into 4 text characters, so expect roughly a 33% size increase over the original image file.
- Can I use the output directly in HTML or CSS?
- Yes. Copy the full data URL and paste it as the src attribute of an <img> tag or inside a CSS url() for a background-image, no separate image file or hosting needed.
- 1
Nothing is uploaded
The file never leaves your device. There is no server to send it to, so there is nothing to leak, log, or subpoena.
- 2
No signup, no limits
No account, no email, no daily cap, no watermark, and no paid tier waiting behind the third file.
- 3
Works offline
Load the page once and it keeps working with the network off, because all the work was always happening locally.