PNG file
Input: Select image/png under 2 MB
Output: Data URI, raw Base64, HTML img snippet, CSS background snippet
Encoding
Convert image files to Base64 data URIs locally with FileReader and preview pasted data URIs.
Images are read locally with FileReader. Base64 output can be much larger than the source file.
Images are read with your browser's FileReader API and are not uploaded. Large files may be slow on mobile devices.
Convert small image files into Base64/data URI snippets for prototypes, fixtures, CSS examples, and local previews.
Input: Select image/png under 2 MB
Output: Data URI, raw Base64, HTML img snippet, CSS background snippet
Input: data:image/png;base64,...
Output: Local preview and copied snippets
Input: Image above the limit
Output: Clear size warning before reading
Create a data URI for tiny mock assets without uploading a file.
Use the text Base64 page for short non-file values.
Escape an img snippet when showing it as code in documentation.
Base64 strings are larger than binary files and can make HTML or CSS heavy.
This page does not compress, scan, resize, or validate image safety.
No. Files are read with the browser FileReader API only.
Common image MIME types such as PNG, JPEG, WebP, GIF, SVG, and AVIF are accepted.
Large Base64 strings can be slow or memory-heavy, especially on mobile devices.