Task path / input to outcome
How to convert an image to Base64
- 01
Choose the image
Image to Base64 Converter: Choose a local PNG, JPEG or WebP image. GIF / SVG. 4 MiB; SVG: 2 MiB.
- 02
Let validation finish
The signature, media type, dimensions, and EXIF orientation are checked locally, and the preview appears only after every check passes. A file that fails any check is refused with the reason named. Nothing is uploaded. Copy seven snippets: Data URL, HTML, CSS, Markdown, JavaScript, React and JSON. SVG.
- 03
Convert to Base64
Validated PNG, JPEG, WebP and GIF retain their original file bytes when encoded. SVG is sanitized before encoding, so its Base64 represents the safe SVG rather than the original untrusted source. The GIF file keeps all original frames.
- 04
Copy the format you need
The result shows the full Data URL and the Plain Base64 payload separately. Use Copy plain Base64 for APIs and configs, select and copy the Data URL for image src attributes and CSS url() values, or Download both as a text file. Convert to Base64: Review the current text and copy or download it. Inputs and results stay in memory in this browser tab.