utills.
Deutsch
Image to Base64

Convert an Image to Base64

Drop any image and instantly copy its Base64 string, data URI, or ready CSS/HTML snippet — free and right in your browser.

Bild zum Kodieren ablegen

Ziehen und ablegen, einfügen oder Datei wählen

PNG · JPG · WebP · GIF · SVG — auf Ihrem Gerät kodiert

Any image formatCopy or .txtNo sign-up PNG · JPG · WebP · GIF · SVG

Why convert an image to Base64?

Base64 turns an image's binary data into plain text, so you can paste it directly into code instead of linking to a separate file. It's the standard way to inline a small icon, logo, or background into a CSS file, an HTML email, a JSON payload, or a data URI — removing one extra network request and keeping everything self-contained.

This tool reads your file in the browser and shows the exact Base64 representation of the original bytes — no re-compression, no quality change. You get the raw Base64 body, the full data:image/…;base64 URI, and ready-to-paste CSS and HTML snippets, each with a one-tap copy and a .txt download.

How to convert an image to Base64

  1. Open your image. Drag a PNG, JPG, WebP, GIF, or SVG onto the tool above, choose a file, or paste from your clipboard.
  2. Pick the output you need. Switch between the raw Base64 string, the full data URI, a CSS background-image rule, or an <img> tag.
  3. Copy or download. Tap Copy to put it on your clipboard, or download the string as a .txt file.

Keep inline images small

Base64 adds about a third to the byte size, so inlining is best for small assets — icons, sprites, tiny logos. For large photos, a normal file or URL stays smaller and the browser can cache it separately.

More Base64 & data URI tools

Häufig gestellte Fragen

Does converting to Base64 lose quality?

No. Base64 is a lossless text encoding of the exact original file bytes, so the image is unchanged. Decoding gives back a byte-for-byte identical file.

What's the difference between the Base64 and the data URI?

The raw Base64 is just the encoded body. The data URI adds the data:image/…;base64, prefix so a browser can use the string directly as an image source.

Which formats can I encode?

PNG, JPG, WebP, GIF, BMP, SVG, AVIF, and ICO. The data URI's media type matches the file you opened.

Where is my image processed?

The encoding and decoding happen in your browser, so the result is created on your own device. How any data associated with the tool is handled is described in our privacy policy.

Weitere Bildwerkzeuge

Find your next tool

37 tools

Compress image Shrink file size while keeping quality. Resize image Change width and height to any size. Crop image Trim images to the exact frame you want. Convert image Switch between JPG, PNG, WebP and more. Remove background Erase the background in one click. Image to PDF Combine images into one PDF document. Rotate & Flip Turn, straighten, and mirror photos. Image to text Pull editable text out of any image. HEIC to JPG Open iPhone HEIC photos as JPG. Watermark Stamp text or logos over your images. Collage Arrange multiple photos into a grid. Favicon Generator Build favicons in every required size. Color Picker Grab hex colors and build palettes. Blur & Pixelate Obscure faces, plates, and private bits. Enhance Auto-fix brightness, contrast, and color. Passport Photo Prepare photos for ID and passport applications. Signature Clean up and extract handwritten signatures. Photo Effects Apply filters and vintage looks. Social Image Size covers for common social platforms. Add text to image Caption images and make memes fast. GIF Maker Turn frames or clips into animated GIFs. Border & Frame Add clean borders and photo frames. Mockup Drop screenshots into device frames. SVG Converter Trace raster images into scalable SVG. EXIF Viewer Inspect camera and GPS metadata. Poster & Print Lay out posters and print-ready sheets. Document Scanner Deskew and clean photographed documents. Image to Base64 Encode images into a data-URI string. Placeholder Make dummy placeholder images on demand. Image generator Make gradients, patterns, and avatars. Compare Images See two images side by side with a slider. QR Code Create and download QR codes. Hide Text in Image Embed a secret message inside a picture. Length converter Meters, feet, inches, miles and more. Weight converter Switch between kilograms, pounds and more. Temperature converter Celsius, Fahrenheit, Kelvin and more. Data storage converter Bits, bytes, megabytes and gigabytes.
Tab to move · Enter to open · Esc to close