Image to Base64 Converter
Convert any image file to a Base64-encoded data URI for embedding directly in HTML, CSS, or JavaScript.
Funciona 100% no seu navegador — o que você insere nunca é enviado nem armazenado nos nossos servidores.
Esta ferramenta ainda não está totalmente traduzida, por isso parte do texto continua em inglês. A ferramenta funciona da mesma forma em todos os idiomas.
Base64 Result:
Result will appear here...
Exemplos rápidos
Entradas típicas e os resultados que esta ferramenta gera.
Visão geral
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.
Por que usar esta ferramenta?
- 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
Recursos
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.
Como usar
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.