Image to Base64 Converter
Convert any image file to a Base64-encoded data URI for embedding directly in HTML, CSS, or JavaScript.
Fonctionne à 100 % dans votre navigateur — vos données ne sont jamais envoyées ni stockées sur nos serveurs.
Cet outil n'est pas encore entièrement traduit : une partie du texte est encore en anglais. L'outil lui-même fonctionne de la même façon dans toutes les langues.
Base64 Result:
Result will appear here...
Exemples rapides
Des entrées typiques et les résultats produits par cet outil.
Présentation
Image to Base64 Converter reads an image file and returns it as a Base64 data URI: a single text string that starts with data:image/…;base64, and can be pasted into an HTML <img> src, a CSS background-image or a JSON payload.
Embedding works well for small icons, logos and inline email images, because the image travels with the page and needs no extra HTTP request. Choose a file of up to 4 MB, check the preview and copy the result. The data type in the string comes from the file you select, such as image/png or image/jpeg.
The file is read locally by your browser and is never uploaded. Base64 text is about a third larger than the original file, so it suits small images better than large photos.
Pourquoi utiliser cet outil ?
- Embed small icons or logos directly in HTML without extra HTTP requests
- Inline images in CSS stylesheets or email templates
- Encode images for use in JSON payloads or API requests
- Create self-contained HTML files with embedded images
Fonctionnalités
100% Private
The conversion happens entirely in your browser — your image file is never uploaded.
Any Browser Image
Accepts files your browser treats as images, such as JPEG, PNG, GIF, WebP and SVG.
Image Preview
Shows the selected image so you can confirm it is the right file.
Copy Data URI
One-click copy of the complete data URI, ready to paste into your code.
Automatic Conversion
The data URI is produced as soon as you choose a file, with no extra button.
4 MB Limit
Larger files are rejected with a clear message to keep the page responsive.
Mode d'emploi
Select your image
Click the file field under "Upload an image (max 4 MB)" and choose an image from your device.
Check the preview
The image appears under "Preview", and the data URI appears in the "Base64 Result" box.
Copy and use
Click "Copy" and paste the data URI into your HTML src, CSS background-image, or API payload.