Drag & drop an image here, or click to select
PNG, JPG, GIF, SVG, WebP, BMP, ICO β up to 10 MB
Select an image file or drop it into the upload area. Copy the raw Base64 result when another field already supplies the MIME prefix, or switch to Data URI when you need a complete source value. To reproduce the example below, save the exact SVG text as icon.svg without a trailing newline and upload that file. The prefix identifies SVG; the following characters encode the file's bytes.
Use the complete output in your image source rather than the shortened example shown here. This tool reads files without resizing or optimizing them, so encoding does not make an image smaller. Uploads are limited to 10MB, and Base64 adds roughly one third to the byte count. Keep larger images as separate resources when embedding would unnecessarily inflate your document.
icon.svg bytes: <svg xmlns="http://www.w3.org/2000/svg"/>
Data URI prefix (truncated): data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
Base64 encoding converts binary image data into an ASCII text string. This allows you to embed images directly in HTML, CSS, or JSON without separate file requests, reducing HTTP requests and simplifying deployment.
This tool supports all major image formats: PNG, JPEG/JPG, GIF, SVG, WebP, BMP, and ICO. Each format is converted with its correct MIME type prefix in the data URI output.
The image is read and processed locally in your browser. This interface does not provide account saving or a server share action. Copying the output uses your clipboard; downloading creates a local file. Keep your original separately, and check where you paste or upload the result in another application.
No. FileReader encodes the original bytes without resizing or recompressing them. Base64 increases the representation size, usually by roughly one third. Use the separate optimizer before encoding when size matters. This upload accepts supported image MIME types up to 10MB; a renamed non-image file is not a valid substitute.
Copy the raw Base64 when a receiving field supplies its own MIME metadata. Choose Data URI when you need the complete data:image/...;base64, prefix for an image source. Preserve the whole output, including padding; the shortened example in the instructions illustrates a prefix and is not a complete embeddable image.