Upload an image
Choose any supported image or load the sample.
Image tools
Free online image to base64 converter
The result will appear here after you run the tool.
The full base64 string is available in the copy action and in the text file download.
Press Ctrl or Command and Enter to run the tool.
About this tool
Image to Base64 Converter draws the image onto a canvas, exports it in the selected format, and converts the bytes to base64. A data URL prefix can be included for direct use in HTML and CSS. The full string is shown, copyable, and downloadable as a text file.
Turn any image into a base64 string you can embed directly in HTML, CSS, JSON, or an API payload. Choose the output format, decide whether to include the data URL prefix, and copy the result or download it as a text file. The encoding happens locally in your browser.
Built for daily work
How to use this tool
Choose any supported image or load the sample.
PNG suits graphics, JPEG shrinks photos, and WebP balances both.
Run the conversion, copy the base64 string, or download it as a text file.
Key features
Include or omit the data:image prefix depending on where you will paste the string.
Encode as PNG, JPEG, or WebP to control size and transparency.
Grab the full string with one copy action or save it as a text file.
The image never leaves your browser during encoding.
Practical use cases
For local tools, input is processed in your browser and is not sent to application analytics.
Data processing noticeTechnical details
Limitations and important notes
Frequently asked questions
A data URL adds the prefix such as data:image/png;base64, before the encoded bytes, which lets browsers render the string directly as an image.
For small assets embedded in documents, emails, or payloads. Large images are better served as files because base64 adds about 33 percent to the size.
No. The canvas API encodes the image entirely in your browser.
Base64 represents every three bytes with four characters, so the string is about a third longer than the binary file.
Related guides and solutions
A transparent explanation of local tool processing, temporary browser memory, local storage, downloads, analytics boundaries, and cases that require remote services.
Learn moreRelated tools
Image tools
Decode base64 strings and data URLs back into image files in your browser, with automatic format detection.
Open toolImage tools
Convert any supported image to PNG in your browser, with lossless output and transparency support for editing and graphics.
Open toolImage tools
Convert any supported image to JPG in your browser, with transparency flattened and quality control for universal compatibility.
Open tool