Embed a tiny PNG
Use full data URLs when embedding small images in HTML or CSS examples.
logo.png
data:image/png;base64,iVBORw0KGgo...
Convert PNG, JPG, WebP, GIF, or SVG images into Base64 data URLs locally in your browser.
Runs locally in your browser. Selected images are not uploaded.Choose a PNG, JPG, WebP, GIF, or SVG file to generate a local Base64 data URL.
Base64 data URL will appear here.
Copy patterns and edge cases worth checking.
Use full data URLs when embedding small images in HTML or CSS examples.
logo.png
data:image/png;base64,iVBORw0KGgo...
Some APIs ask for only the Base64 payload, without the data:image/... prefix.
icon.svg
PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmci...
Short answers before you paste real data.
No. The file is read with browser APIs and converted locally in your current browser session.
Base64 represents binary bytes as text, which usually makes the output roughly one third larger than the original file.
Usually no. Base64 is best for small assets and inspection. Large data URLs can make pages heavy and harder to cache.
Useful next steps that also run locally in your browser.
Encode text to Base64 or decode Base64 back to UTF-8 safely in your browser.
Create downloadable QR codes from links or text locally in your browser.
Encode URL components, decode percent-encoded text, and parse query parameters.