en

Image to Data URI

Convert an image to a Base64 data URI locally - paste it straight into HTML or CSS. No upload.

Running locally on your device ...

Your files

    Running locally on your device ...

    0%

    Is my file uploaded?

    No. Everything runs in your browser - your file never leaves your device. How this is verifiable

    No upload100% local
    Your content stays with youno third-party access
    Hosted in GermanyGlobal Content Delivery
    Independently auditedTLS A+ · HTTP headers A+

    A data URI encodes an image directly as text (Base64), so you can embed it inline in HTML (an img src) or CSS (a background) without a separate file or extra network request. This tool converts your image into a ready-to-paste data: URI.

    The output is a plain text file containing the full data:image/...;base64,... string. It is handy for tiny icons, email templates, single-file demos, or avoiding an extra request, though the Base64 text is about a third larger than the original bytes.

    Everything runs entirely locally in your browser (no upload, even offline) - your image never leaves your device. The image is encoded exactly as it is (same bytes, same format, no re-encoding); a very large image makes a very long string, so this suits small images best.

    The honest trade-off of inlining: a data URI travels with every delivery of the HTML or CSS file and is not cached separately by the browser. As a rule of thumb, inlining only pays off for very small graphics - icons under a few kilobytes; large images are better left as their own file. For a quick check you can paste the string straight into the browser's address bar.

    Specifications

    Specifications
    Input formatsJPG, JPEG, PNG, WEBP
    Auto-conversionGIF, BMP, TIFF, ICO, SVG, HEIC, PDF, DOCX, DDS, HDR, PCX, WBMP
    Output formatTXT
    Batch processingYes
    ProcessingLocally in your browser (JavaScript)
    File uploadNone

    In 3 steps

    1. Drop or tap your image (PNG, JPEG or WebP).
    2. It is Base64-encoded into a data: URI in your browser.
    3. Download the text file with the data URI (ready to paste).

    Limitations: Encodes the image bytes exactly as Base64 into a data:<type>;base64,... string saved as a text file. Base64 is about 33% larger than the original, so it is best for small images. The original format and bytes are kept (no re-encoding).

    FAQ

    Is my image uploaded?

    No. The encoding happens entirely locally in the browser - even offline. Your image never leaves your device.

    Where do I use a data URI?

    Paste it as an img src or a CSS background to embed the image inline, without a separate file or request.

    Does it make the file bigger?

    Yes. Base64 text is about a third larger than the original bytes, so a data URI suits small images best.

    Is the image changed?

    No. The exact original bytes are encoded, so the format and quality are unchanged.

    Related tools

    Image collage · Compress images · PNG to SVG · SVG optimization