Image to Base64 Converter
Convert a local image to a complete Base64 data URL. Preview the image, copy the URL or download image-base64.txt. Browser processing, up to 64 MiB.
Start using
What Image to Base64 Converter does
Convert a local image to a complete Base64 data URL. Preview the image, copy the URL or download image-base64.txt. Browser processing, up to 64 MiB.
Worked example
icon.png
data:image/png;base64,iVBORw0KGgo…
How the result is produced
Base64 represents binary bytes with printable characters. It is reversible encoding, not compression or encryption, and normally makes the payload roughly one third larger.
Useful workflows
- Embed a small icon in CSS or HTML
- Create a portable API or test fixture
- Inspect or transfer a small binary asset as text
Important limits
- Large Base64 strings increase HTML, CSS and memory use.
- Encoding does not hide or secure the image.
- The data URL MIME type must match the actual file format.
Frequently asked questions
Why is Base64 larger than the image file?
Every three binary bytes are represented by four Base64 characters, plus any data-URL prefix.
Should I embed every website image?
No. External files usually cache better; inline data is most useful for small, self-contained assets.
When is Base64 a poor choice for an image?
Large images grow by roughly one third and can slow HTML or CSS; use normal image files for substantial assets.
Image to Base64 Converter
Limits: 64 MiB (67,108,864 bytes) per image and 24,000,000 decoded pixels. Files over the byte limit are rejected before reading; decoded dimensions are checked before building the Base64 string. The full file is encoded without canvas re-encoding, so metadata and animation bytes remain in the output even though the preview is not an animation-preservation test. For N bytes the Base64 body has 4 × ceil(N/3) characters, plus the data-URL prefix. Examples ending in an ellipsis are abbreviated, not usable complete images. Encoding is not sanitization or encryption; the MIME prefix comes from the browser’s file type and does not certify the real format. Large inline images increase document and memory size and cannot be cached separately from that document.
data:image/png;base64,... Base64 length = 4 × ceil(N / 3)
Processing takes place locally in your browser.