induwara.lk
induwara.lkImage · Privacy-first

Image Format Converter — JPG, PNG, WebP, AVIF, HEIC

Convert images between JPG, PNG, and WebP entirely in your browser — and decode AVIF or HEIC inputs without installing a thing. Batch up to 50 files at once, files never leave your device, sources cited below.

By Induwara AshinsanaUpdated May 11, 2026
Image Format ConverterJPG · PNG · WebP · AVIF · HEIC · in-browser
Files stay on your device

Everything runs in your browser. Nothing is uploaded.

What this does

Drop in a JPG, PNG, WebP, AVIF, HEIC, GIF, or BMP image and re-encode it through your browser's built-in encoder into any of JPEG, PNG, or WebP. Batch supported. Files stay on your device — open your browser's Network tab to confirm.

Output format

Lossy format — the quality slider below sets the compression level.

High — recommended default

Higher = larger, sharper. 0.85 is the default for JPEG / WebP / AVIF; below 0.55 visible artefacts appear.

Images queued
0
Add an image to start
Input size (total)
0 B
Output size
Press Convert to compute
Saving
Ready to convert

Add at least one image to get started.

Estimator uses an empirical bits-per-pixel curve fitted to the JPEG corpus and the Google WebP study. Actual output size is set by your browser's encoder and may differ by ±10–20% on textured content. Sources last verified 2026-05-11.

How it works

Every modern browser ships with two pieces of image infrastructure: a decoder that wires into the <img> element for every format the browser supports, and an encoder reachable through one Web API: HTMLCanvasElement.toBlob(callback, mimeType, quality). The converter chains the two together — decode your source into an off-screen canvas, then ask the browser to re-encode it as the target format. No file leaves the page; open your browser's Network tab while using the tool to confirm.

The decoder side is broad: every browser handles JPG, PNG, WebP, GIF, and BMP; AVIF is decodable on Chrome / Edge 85+, Firefox 113+, and Safari 16+; HEIC is decodable only on Safari for Apple devices, because Apple holds the patent licence. The encoder side is narrower — canvas.toBlob produces JPEG, PNG, and WebP in every browser, but no browser today exposes a canvas AVIF or HEIC encoder. The tool detects what your browser actually supports on load and surfaces a clear message when you try to read or write a format the browser can't handle.

Output file size is the product of three factors: pixel count (twice the pixels, roughly twice the bytes), encoder family (WebP averages 25–34% smaller than JPEG at the same perceptual quality, per Google's 2010 / 2016 WebP study; AVIF runs another ~20% smaller again on photographic content), and quality setting on the 0..1 scale that toBlob accepts. The size estimator surfaced in the calculator uses an empirical bits-per-pixel curve fitted to JPEG corpora and cross-checked against the WebP study:

bpp_jpeg(q) = 0.05 + 1.4 × (q / 100)^2.5
bpp_webp(q) = bpp_jpeg(q) × 0.70
bpp_avif(q) = bpp_jpeg(q) × 0.56
bytes       = (pixels × bpp) / 8  +  ~1 KB header overhead

The 0.05 floor accounts for the bits-per-pixel a JPEG still needs for its quantised DCT coefficients and Huffman tables even at quality 0. The 2.5 exponent captures the steep growth in size between q=60 and q=90 — the band where most visible detail is preserved. The estimator is cross-checked against a second formula that linearly interpolates a five-point lookup table; the two land within ±5% on every quality between 1 and 100. The page surfaces both so you can see the agreement on each worked example below.

For every image in the batch the tool does five deterministic things:

  1. Recognise. Read the file's MIME type if the browser reports one, otherwise fall back to the filename extension. Falling back matters because some drag-drop paths and Linux file pickers drop the MIME entirely.
  2. Validate. Reject anything over 50.0 MBor any format your current browser can't decode (HEIC outside Safari, AVIF on legacy browsers) with a specific reason instead of a silent failure.
  3. Decode. Load the source into an HTMLImageElement so the browser uses its native decoder. Read dimensions from naturalWidth / naturalHeight.
  4. Re-draw. Paint the image onto a fresh canvas at its source dimensions with imageSmoothingQuality = "high". For JPEG / BMP targets, pre-fill the canvas with white so transparent source pixels don't turn black on encode.
  5. Encode & download. canvas.toBlob produces the converted Blob at the target MIME and quality. The tool wraps it in an object URL and offers the download with the target file extension applied to the source filename.

Worked examples

Phone JPG → WebP (smaller and equally sharp)

A 4032 × 3024 photo straight from a phone camera roll, converted to WebP at quality 0.85. WebP averages 25–34% smaller than JPEG at the same perceptual quality (Google WebP study), so a 3.3 MB JPEG typically lands near 1 MB without visible loss.

  1. Pixels: 4,032 × 3,024 = 12,192,768
  2. Conversion: JPEGWebP at quality 85
  3. Estimate (curve): ≈ 1.0 MB
  4. Cross-check (lookup): ≈ 1.0 MB
  5. Typical source: 3.1 MB saving ≈ 68.2%

PNG screenshot → JPEG (great for email)

A 1920 × 1080 desktop screenshot saved by the OS as PNG. PNG is lossless and stays large for photographic regions; re-encoding the same pixels as JPEG at quality 0.92 typically saves 80% with no perceptual change at viewing size.

  1. Pixels: 1,920 × 1,080 = 2,073,600
  2. Conversion: PNGJPEG at quality 92
  3. Estimate (curve): ≈ 301.4 KB
  4. Cross-check (lookup): ≈ 286.0 KB
  5. Typical source: 1.7 MB saving ≈ 82.86%

HEIC iPhone photo → JPEG (universally compatible)

iPhones default to HEIC, but most desktop tools, Windows mail clients, and Sri Lankan e-government portals refuse it. Open the image in Safari (the only browser that decodes HEIC natively) and download as JPEG to fix the compatibility problem in one step.

  1. Pixels: 4,032 × 3,024 = 12,192,768
  2. Conversion: HEICJPEG at quality 90
  3. Estimate (curve): ≈ 1.6 MB
  4. Cross-check (lookup): ≈ 1.6 MB
  5. Typical source: 1.8 MB saving ≈ 9.64%

Format compatibility at a glance

What your browser can read and write changes every year as new codecs ship. Here is what every shipping browser handles today.

FormatReadWriteTransparencyBest for
JPEGEvery browserYes (canvas)NoPhotographs. Smallest universally compatible format. No transparency.
PNGEvery browserYes (canvas)YesLossless. Logos, icons, screenshots, anything with transparency.
WebPEvery browserYes (canvas)Yes25–34% smaller than JPEG at equal quality. Supports transparency.
AVIFChrome / Edge 85+, FF 113+, Safari 16+Not in any browserYesNewest format — decode in Chrome / Edge / Safari 16+. Browsers can't encode yet.
HEICSafari onlyNot in any browserYesiPhone default. Decode in Safari only — convert to JPEG for sharing.
GIFEvery browserNot in any browserYesDecodes everywhere; canvas cannot re-encode GIFs (only the first frame).
BMPEvery browserNot in any browserNoLegacy uncompressed bitmap. Decodes in every browser; rarely useful as output.

Frequently asked questions

Sources & references

Related tools

Rate this tool
Be the first to rate

Comments & feedback

Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.

Found a bug, edge case, or want to suggest an improvement?

Email me at [email protected] — most fixes ship within 24 hours.