Select an image and get a Base64 data URI you can paste into HTML, CSS, or prototypes. The file never leaves your device.
How to use this tool
- Choose an image file.
- Wait for the encoded output to appear.
- Copy the data URI or raw Base64 as needed for your stack.
Tips
- Data URIs increase HTML size—fine for tiny icons; avoid huge photos inline.
- For production sites, prefer hosted files or a CDN for large assets.
- After resizing, you can still encode—try Image resizer first for smaller payloads.
Related tools
- Image resizer — shrink dimensions before encoding
- JSON formatter — pretty-print JSON that references data URIs
- Image to PDF — alternative packaging for multiple images
FAQ
Is Base64 smaller than the file?
No. Base64 is roughly ~33% larger than raw binary—trades size for embeddability.
Can I use this for SVG?
If the tool accepts SVG and your browser loads it, yes. Complex SVG may be easier to inline as markup instead of Base64.
Does this upload my image?
No. Encoding runs locally in your browser.
More developer tools
Base64 Encoder & DecoderEncode text to Base64 or decode Base64 back to text, right in your browser. Handles emoji and accented characters correctly, with URL-safe output.
HTML Entity Encoder & DecoderEscape HTML so tags display as text, or decode entities back into characters. Supports all HTML5 named entities, in your browser.
JSON FormatterFormat and minify JSON in your browser. Paste JSON, click Format or Minify. No data sent to any server.
JWT DecoderDecode a JSON Web Token to read its header, payload, and expiry. Runs entirely in your browser — the token is never sent anywhere.
