Image to Base64
Convert image to Base64
Drag & drop an image or click to select
Supports JPEG, PNG, GIF, WebP, SVG
Preview
Base64 Output
Frequently Asked Questions
How do I convert an image to Base64?
Upload an image (JPG, PNG, GIF, SVG, WebP). The tool encodes it as a Base64 string. Copy the result as a raw Base64 string or as a data URI (data:image/png;base64,...) ready to embed directly in HTML or CSS.
What is Base64 encoding for images?
Base64 converts binary image data into ASCII text using 64 characters (A-Z, a-z, 0-9, +, /). This allows embedding images directly in HTML, CSS, JSON, or emails without separate file requests. The encoded string is about 33% larger than the original file.
When should I use Base64 images instead of image files?
Use Base64 for: small icons under 5 KB, email HTML templates, single-file HTML documents, CSS background images, and reducing HTTP requests. Avoid for: large images (increases page size), frequently changing images, or images that benefit from caching.
How do I embed a Base64 image in HTML?
Use the data URI in an img tag: <img src="data:image/png;base64,iVBOR...">. For CSS: background-image: url(data:image/png;base64,iVBOR...). The tool generates the complete data URI ready to paste.
What is the maximum image size for Base64 encoding?
No technical limit, but practical limits apply. Base64 increases size by 33%. A 1 MB image becomes 1.33 MB of text. Large Base64 strings slow page loading and cannot be cached separately. Keep Base64 images under 10 KB for best performance.