🖼️ Conversor de Imagen a Base64 — Generar Data URI
Convert any image (PNG, JPG, GIF, WebP, SVG) to a Base64 data URI. Preview the image, copy the data URI for use in CSS or HTML. 100% browser-based.
Drop your image file and instantly get its Base64-encoded data URI. Copy the full data:image/... string to embed the image directly in your CSS background-image or HTML img src — no separate file needed, no server request.
How to Use
Upload your image
Click the upload area or drag and drop any PNG, JPG, GIF, WebP, or SVG file.
Choose output format
Toggle between full Data URI (data:image/png;base64,...) and raw Base64 string only.
Copy the result
Click Copy to clipboard. Use the data URI directly in your CSS background-image or HTML src attribute.
Frequently Asked Questions
Guía: Convertidor de Imagen a Base64
¿Qué es?
Convierte imágenes a cadenas Base64 para incrustarlas directamente en CSS, HTML o JSON sin archivos externos. Ideal para iconos pequeños, emails HTML y APIs que requieren datos binarios en JSON.
Desventaja: imágenes ~33% más grandes y sin caché separada — solo para recursos pequeños (<5KB).
Cómo usar
- Arrastra o sube la imagen (PNG, JPG, SVG, GIF).
- El data URI completo se genera automáticamente.
- Copia para usar directamente en CSS/HTML.
Consejos
- Usa SVG en Base64 para iconos — son más pequeños que PNG y escalables.
- Para imágenes grandes, usa CDN con HTTP/2 en lugar de Base64 inline.
- El data URI para PNG:
data:image/png;base64,...