Image to Base64

Upload an image, pick a format (Data URI, Base64 only, CSS, HTML, Markdown, or JSON), then copy the output with one click.

Mode:

Upload Image

Encoded Output

Summary

Upload an image, pick a format (Data URI, Base64 only, CSS, HTML, Markdown, or JSON), then copy the output with one click.

How it works

  1. Click the upload area or drag and drop an image file onto the drop zone.
  2. Wait for the preview to appear along with the image dimensions and file size.
  3. Select the output format that matches your use case using the format buttons.
  4. Click the Copy button next to the output field to copy the encoded string.
  5. To reverse the process, toggle "Decode (Base64 to Image)", paste a data URI, and click Decode.

Use cases

  • Embed small icons or logos directly in CSS to eliminate HTTP requests.
  • Inline images in HTML email templates where external image hosting is unreliable.
  • Store image assets in a JSON configuration file or database column.

Frequently Asked Questions

Last updated: 2026-06-10 · Reviewed by Nham Vu