Image to Base64
Encode & Decode · Browser-based · Instant
Upload Image
base64 • output
About Image to Base64 Converter
Base64 encoding converts binary image data into a string of ASCII characters. This lets you embed images directly in HTML, CSS, or JSON without a separate network request — useful for small icons, loading spinners, and offline-capable apps.
Output formats explained
Data URL
`data:image/png;base64,…` — embed directly as an img src attribute
Raw Base64
Just the encoded string without the data URL prefix
CSS background
`background-image: url("data:image/png;base64,…")` — paste in your CSS
HTML img src
`<img src="data:image/png;base64,…">` — paste directly in HTML