Image to Base64
Encode an image and copy it as Raw Base64, Data URI, HTML, CSS, Markdown, or JSON.
5 of 5 free uses left
Source image
Upload an image to see the encoded output
Image to Base64 — Encode Images for Embedding in Code
Base64 encoding converts images into text strings that can be embedded directly in HTML, CSS, JavaScript, Markdown, or JSON. This eliminates the need for separate image files, which is useful for small icons, email templates, and reducing HTTP requests.
Our tool converts images entirely in your browser — no data is uploaded to any server. Pick the format you need: Raw Base64, Data URI, <img> tag, CSS background, full CSS rule, Markdown, or JSON.
How It Works
Upload Image
Select any image file to encode.
Pick Format
Choose Raw, Data URI, Image tag, CSS, Markdown, or JSON.
Copy String
Copy the formatted output for use in your code.
Why Use Our Tool?
7 Output Formats
Raw Base64, Data URI, <img>, CSS, Full CSS, Markdown, JSON.
100% Client-Side
No data is uploaded. Encoding happens entirely in your browser.
Any Format
JPG, PNG, WEBP, GIF, and SVG images are supported.
Instant Results
Encoding completes in milliseconds.