piapia123
en

Image to Base64 Converter

Web & Network

Everything runs locally in your browser — nothing is uploaded

Drop an image here, or click to choose

You can also press Ctrl/⌘ + V to paste a screenshot

PNG / JPEG / WebP / GIF / BMP / SVG / AVIF / ICO · up to 10 MB each

Images are read and converted inside your browser only — nothing is uploaded. It keeps working offline.

PREVIEW

No image selected yet

RESULT

Turn an image into Base64 text or a data URL, ready to inline in HTML, CSS or an API request. Drop a file, pick one, or take a screenshot and press Ctrl or Command plus V to paste it. Before converting you can scale it down to a maximum edge, switch to PNG, JPEG or WebP and set the quality, so even a multi-megabyte photo can be squeezed into something worth inlining. The file is read and converted inside your browser and at no point is it sent anywhere — the tool keeps working with the network switched off.

Features

  • Three ways in: drag and drop, file picker, or paste from the clipboard
  • Scales to a maximum edge of 2560, 1920, 1280, 800, 512 or 256 pixels, or not at all
  • Only ever scales down, so a small image is never interpolated into a fake larger one
  • Keeps the original format or converts to PNG, JPEG or WebP
  • Quality control for JPEG and WebP; PNG is lossless, so the slider is disabled instead of pretending
  • SVG is read as original vector content and never rasterised — unless you explicitly ask for a bitmap format
  • Shows a preview alongside the original size, the output text size and the pixel dimensions
  • Warns before you commit when the result will be huge — Base64 text is about a third larger than the file
  • One click to copy, or download it as a file in the output format

How to use

  1. Drop an image in, pick one, or screenshot and paste it with Ctrl or Command plus V
  2. Set the maximum edge, output format and quality as needed
  3. The result appears automatically with its size and pixel dimensions
  4. Click Copy for the text, or Download to keep it as a file

FAQ

Is my image uploaded to a server?
No. Files are read with FileReader and scaled with a canvas, entirely inside your browser memory, and the page makes no network requests. If you want proof, switch off your network and try again — it behaves exactly the same. That matters most for personal photos and screenshots that carry client information.
Why is the text bigger than the image?
Base64 spends 4 characters on every 3 bytes, so the payload grows to roughly four thirds of its original size. A 3 MB photo becomes about 4 MB of text. Inlining that in HTML or CSS adds the same weight to the page, which is why larger images are better served from a normal file URL and Base64 is best kept for small icons and cases where inlining is unavoidable.
Why did my GIF stop animating?
A canvas can only read the first frame; no browser can write an animated GIF back out. So the animation is lost, and the result says so explicitly. If the animation has to survive, skip the canvas entirely and Base64-encode the original file instead.
Why was my SVG not resized?
An SVG is vector graphics, and rasterising it destroys the one thing it is good at: staying sharp at any size. So when the output format is left as the original, an SVG is read as raw bytes and the resize option does not apply. Only when you explicitly choose PNG, JPEG or WebP is it turned into a bitmap, and the result then says it was rasterised.
Can it convert HEIC photos?
That depends on your browser. Safari can decode HEIC, most Chromium browsers cannot. When decoding fails you get a clear message saying the browser could not read the image rather than a broken result. Exporting to JPEG with your system tools first will work.
Is there a size limit?
10 MB per image. Beyond that the resulting text gets long enough to make the tab visibly sluggish, so the file is rejected before processing starts rather than letting you wait until the browser chokes.

Related tools