File preview
Processing runs on your device in your browser. Review the output before using it.
Encode an image as data.
Processing runs on your device in your browser. Review the output before using it.
Represent a selected image as a Base64 data URL for small development examples or a self-contained snippet. The output includes a media-type prefix so a compatible consumer can identify the payload as image data rather than ordinary prose.
Choose a small image and generate the result. Copy the complete data URL when the destination expects that format. If a system requests only raw Base64, follow its instructions and separate the prefix rather than blindly pasting the entire value.
A data URL begins with a structure such as data:image/png;base64, followed by encoded bytes. It describes the selected file rather than a newly compressed image. The encoded text is generally larger than the binary source, commonly by roughly one third before the prefix.
Embedding large data URLs makes documents harder to maintain and can exceed editor or browser limits. It is not encryption, and anyone who receives the string can recover the image. Prefer ordinary image files for large assets or content that should benefit from separate browser caching.
Start with a small, non-sensitive example and compare the result with the format expected by the receiving application. A successful transformation shows that this operation ran; it does not prove that the result is valid for every API, database field or application rule. Check the destination documentation before using generated data in a live workflow.
The inputs are handled by browser JavaScript for this tool. Do not paste production credentials, customer records or private configuration merely to test a format. Keep a reproducible sample with harmless values instead. If an error appears, reduce the sample until the problematic portion is clear, then correct the source and run the operation again. When copying the output, include the complete value and avoid adding surrounding quotation marks unless the destination specifically requires them. A copied newline or omitted closing character can change how another application reads an otherwise correct result.
Explore all tools, read our privacy information or report a problem.
Base64 generally expands binary data by roughly one third before the data URL prefix. It is a representation for transport, not image compression.
Copy the complete data URL when the receiving system expects one. If it requests raw Base64, follow its instructions and separate the media-type prefix.
No. Anyone who receives the encoded value can normally reconstruct the image. Avoid publishing a data URL containing private material.