Convert an image to Base64 for free
Get your image’s Data URI (data:image/png;base64,…) ready to paste into an img tag, a CSS rule or a Markdown document.
Drag your images here or click to choose them
Use your Google Drive without giving up your privacy
Pick files from your Drive, process them here and save the result to any folder you like. Everything happens in your browser: ShiftAny has no servers of its own.
- Your Google Drive
- Your browserAll processing happens here
- Your Drive or your device
- Your files travel straight between Google and your browser. They never touch a server of ours, because we don’t have any.
- Processing runs on your device, exactly as it does with a file from your computer.
- The app can only access the files you pick and the ones it saves to your Drive. Never the rest.
- Access expires after one hour and is never stored. This browser only remembers your name and email so you can reconnect in one click; you can disconnect at any time.
- Processing
- In your browser
- Upload
- No upload to ShiftAny
- Account
- No sign-up
- Price
- Free
- Input
- JPG, PNG, WebP, GIF, BMP, AVIF, SVG
- Output
- BASE64, CSS, HTML
- Platform
- Web browser
How to use “Image to Base64”
- Add the image you want to embed (PNG, JPG, WebP, GIF, SVG…).
- Pick the code format: Data URI, CSS, HTML, Markdown or Base64 only.
- Click “Copy” or download the code as a text file.
When embedding an image pays off
A Data URI puts the image inside the HTML or CSS itself: it saves a request to the server, but the text takes 33 % more space than the file and is not cached separately. It is worth it for small icons and graphics under 10 KB; for photos or large images, linking the file is better, and the tool warns you when yours goes over that size. The Data URI’s image type is worked out from the bytes themselves, not the file extension, so it is always correct.
Are my files uploaded?
No. ShiftAny Images processes your images directly on your device: this tool runs in your browser and never sends your files to any server.
Frequently asked questions
What is a Data URI?
A way of writing a file inside a URL: data:, the image type and the data encoded in Base64. Browsers display it just as if it were a link to the image.
Why is the text bigger than the image?
Base64 represents every 3 bytes with 4 characters, so the result is 33 % larger. If the HTML is served compressed with gzip or Brotli, the difference shrinks considerably.
How do I turn the text back into an image?
With “Base64 to Image”: paste the Data URI or the Base64 and download the image in its real format.