Loading...
Loading...
We use cookies to enhance your experience, analyze site usage, and serve personalized content. By clicking "Accept All," you consent to our use of cookies. See our Cookie Policy and Privacy Policy for details.
Convert images to Base64 encoded strings for embedding in HTML/CSS
Click or drop images here
PNG, JPG, GIF, WebP, SVG, BMP, ICO · Max 10MB
Converts images to Base64 encoding with drag-and-drop support, offering three output modes: data URI (for HTML src), raw Base64, and base64url (URL-safe). Supports resizing before encoding, batch mode for multiple images, and a decode-back mode that converts Base64 strings back to viewable images.
Embedding images directly in HTML, CSS, or JSON avoids extra HTTP requests but requires Base64 conversion. This tool makes it easy to generate the right format for each context and even resize images before encoding to keep the data URI small.
Frontend developers inlining small images in HTML/CSS, mobile app developers embedding assets in JSON, and API developers encoding image data in responses.
Drag and drop an image or click to browse and upload
Select output mode: Data URI (data:image/...), Raw Base64 (just the encoded string), or Base64url (URL-safe variant)
Optionally enable resize before encode and set max width/height to reduce the encoded output size
In batch mode, upload multiple images and see each result with a copy button
Switch to decode-back mode, paste a Base64 string, and view the decoded image preview
Copy the encoded output to clipboard with the copy button
Input: 16x16 favicon.png. Output (Data URI mode): 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...'Input: Resize a 4000x3000 photo to 200px wide before encode. Output: ~4KB base64url string instead of ~4MB raw.Encode and decode Base64 strings online free
Encode and decode URLs and URL components online free
Escape and unescape strings for JavaScript, JSON, HTML, URL, and more
Encode and decode HTML entities for web development
Dive deeper with our comprehensive guides and tutorials.