Online Image to Base64 Converter
Convert images to raw Base64 or data URLs. Preview your image, copy the output, or download it as a text file.
or drop here · up to 50 MB
PNG, JPEG, GIF, WebP, BMP, SVG
Preview (optional)
Your image appears here after you choose a file.
Quick start
How to encode an image to Base64
-
Choose an image — drop or browse a PNG, JPEG, GIF, WebP, BMP, or SVG (max 50 MB).
-
Encode — click Encode. The tool verifies the file is a real image, then builds a Base64 string in your browser.
-
Copy or download — switch between Data URL and Raw Base64, copy the string, or download it as a .txt file.
Format notes
Data URL vs raw Base64
A data URL includes a MIME prefix such as data:image/png;base64, followed by the payload. Use it in HTML <img src>, CSS background-image, or anywhere a URL is accepted.
Raw Base64 is only the encoded payload—no data: prefix. APIs and some config files expect this form.
Base64 is encoding, not encryption or compression. Anyone can decode it, and the text is typically about one-third larger than the original file.
Supported inputs: PNG, JPEG, GIF, WebP, BMP, and SVG. Renamed non-image files are rejected even if the extension looks valid.
Processing stays in your browser on this page—images are not uploaded to ConversionTab servers for encoding.
Help
Image to Base64 FAQs
Short answers about output formats, size, supported images, and privacy.