Not that long ago, converting an image format meant either owning Photoshop or uploading your file to some random website and hoping they'd delete it afterward. Neither option was great. One cost money, the other cost privacy.

Browsers are quietly capable of doing this themselves. They've been able to for years. Most people just don't know it because nobody told them.

The Format Landscape — What You Actually Need to Know

There are probably a dozen image formats you'll encounter in practice. Realistically, three cover almost everything:

JPEG

JPEG uses lossy compression, which means it discards some image data permanently when you save. The discarded data is weighted toward things human vision is least sensitive to — fine detail, subtle colour gradations at high frequencies. Done well, the result looks identical to the original. Done badly, you get the blocky artifacts you've probably seen around text in screenshots.

JPEG is excellent for photographs. It's a poor choice for screenshots, UI mockups, or anything with text and sharp edges, where the compression creates visible artifacts right where you're looking.

One thing JPEG can't do: transparency. If you need a transparent background, look elsewhere.

  • Good for: Photos, hero images, blog thumbnails
  • Not for: Screenshots, logos, anything needing a transparent background

PNG

PNG is lossless. Every pixel is preserved exactly, which makes it substantially larger than JPEG for photographic content — sometimes 10–20× larger. But for graphics, icons, screenshots, and anything with text, it's the right call. No artifacts. Clean edges. Full alpha channel transparency.

The practical rule: if the image was created in a design tool or captured from a screen, use PNG. If it came from a camera or is purely photographic, use JPEG.

WebP

Google released WebP around 2010, and after a long period of inconsistent browser support, it's now universally supported. The pitch is simple: better compression than both JPEG and PNG.

WebP comes in two modes. Lossy WebP beats JPEG by about 25–35% at equivalent quality. Lossless WebP beats PNG by roughly 26% on average. And it supports transparency in both modes. For anything served on the web, WebP is usually the right default.

The one limitation is older software. Photoshop versions before 2021 didn't support WebP natively. Some older desktop apps still don't. If you're sending images to someone who might open them in legacy software, stick with JPEG or PNG for compatibility.

How the Browser Does This

When you upload an image to a browser-based converter, here's the actual sequence of events:

  1. The browser reads the file into memory using the FileReader API
  2. An element loads the decoded pixel data — the browser's image codec handles the format-specific decompression
  3. That pixel data gets drawn onto an HTML element
  4. The canvas exports the pixel data in the target format using canvas.toBlob() with the appropriate MIME type
The relevant part of that is step 4. Here's what the actual code looks like:
async function convertToWebP(file) {
  const img = new Image();
  img.src = URL.createObjectURL(file);
  await new Promise(resolve => img.onload = resolve);

  const canvas = document.createElement('canvas');
  canvas.width = img.naturalWidth;
  canvas.height = img.naturalHeight;

  canvas.getContext('2d').drawImage(img, 0, 0);

  return new Promise(resolve => {
    canvas.toBlob(resolve, 'image/webp', 0.85);
    // 0.85 = 85% quality. Adjust as needed.
  });
}

The browser's native image codecs handle the actual encoding. This is the same high-performance code used every time your browser decodes an image to display on a page. It's fast, it's accurate, and it runs entirely on your machine.

No file leaves your device. No server is involved. The processing is local.

Converting with NexaTools

The NexaTools Image Converter uses this same approach. Drop in your file, pick the output format, set a quality level if relevant, and download the result. For most images it completes before you've finished reading the page.

A few things worth knowing about how it works:

Batch conversion. You can select multiple files at once. Each one is processed through the canvas pipeline independently and gets its own download link.

Quality slider. The quality control only matters for JPEG and WebP outputs — both use lossy compression where the quality setting trades file size against visual fidelity. PNG is always lossless, so the slider is ignored for PNG outputs.

Format detection. The tool reads the file header to determine the actual input format, not just the file extension. A JPEG renamed to .png will still be processed correctly.

Quality Settings — The Part Most Guides Get Wrong

The JPEG quality scale is not linear, and the default settings in most tools are often too conservative. Here's what actually happens at different quality levels:

Quality %Typical File SizePractical Result
95–100Very largeNear-indistinguishable from uncompressed
85–90Medium-largeExcellent quality; safe for print and display
75–85MediumGood quality; this is the web standard
60–75SmallNoticeable artifacts on close inspection
Below 60Very smallVisibly degraded; avoid unless you have to
The interesting thing about this table: there's a fairly sharp quality cliff around 70–75%. Above that, most people can't tell the difference. Below it, most people can. For web images, 82–85% gives you roughly 60–70% file size reduction compared to a lossless source, with no perceptible quality loss at normal viewing sizes.

For WebP, you can afford to go a bit lower. WebP at 75% typically looks comparable to JPEG at 85%, while being 25–30% smaller.

Which Conversion Makes Sense When

PNG → WebP (lossless): Best all-around modern conversion. Smaller files, same quality, same transparency support. Do this for any PNG headed for the web.

JPEG → WebP (lossy): 25–35% size reduction with equivalent quality. Worth doing for any image that needs to load fast.

WebP → JPEG or PNG: Usually done for compatibility — sending files to someone on older software, or uploading to a platform that doesn't accept WebP yet. Some social media platforms and email clients still don't handle it well.

PNG → JPEG: Use when you need maximum compatibility and don't need transparency, and the image is photographic enough that JPEG compression won't cause visible artifacts. Don't do this with screenshots or text-heavy images.

When to Use Command-Line Tools Instead

For occasional conversions, a browser tool is faster and simpler. For converting hundreds or thousands of images at once — say, optimizing a full image library for a website redesign — command-line tools are more practical:

# Convert all JPEGs to WebP using cwebp
for f in *.jpg; do cwebp -q 82 "$f" -o "${f%.jpg}.webp"; done

# Using ImageMagick (converts and resizes at once)
mogrify -format webp -quality 82 -resize 1200x *.jpg

# Using FFmpeg (yes, it does images too)
ffmpeg -i input.png output.webp

For everything else — one-off conversions, privacy-sensitive images, files you'd rather not upload anywhere — the NexaTools Image Converter does the job entirely in your browser, in seconds.