PureDevTools

PNG to JPG Converter

Convert PNG images to JPEG — quality control, transparency background fill, instant download

All processing happens in your browser. No data is sent to any server.

Click to browse or drag and drop an image

PNG, JPG, WebP, GIF, AVIF — any browser-readable image

PNG and JPEG serve different purposes, and there are good reasons to convert between them. Drop your PNG here, choose your quality and background color for any transparent areas, and download the JPEG in seconds. Everything runs in your browser — no file is ever uploaded to a server.

Why Convert PNG to JPG?

Smaller file size. JPEG uses lossy compression optimized for photographic images. A typical photo saved as PNG might be 2–5 MB; the same image as a JPEG at quality 90 is often under 500 KB — a 4–10× reduction. For web pages and email, this makes a real difference in load time.

Wider compatibility. JPEG is supported by virtually every image viewer, email client, CMS, and social platform since the early 1990s. Some older tools or upload forms still struggle with PNG for photographic content.

No transparency needed. If your PNG does not use transparency, converting to JPEG is almost always worthwhile for photos. You get a smaller file with no perceptible quality loss at quality settings of 85–95.

Social media and CMS uploads. Many platforms automatically re-compress uploaded images. Starting with a properly sized JPEG at quality 90 gives you more control over the final output than uploading a large PNG and letting the platform decide.

How Transparency Is Handled

JPEG does not support transparency — it has no alpha channel. Any transparent pixels in your PNG must be replaced with a solid color before saving as JPEG.

This tool fills the transparent areas with a background color of your choice before conversion. The default is white (#ffffff), which works for most use cases. If your PNG has a dark or colored background, pick the matching color to avoid a white halo effect around transparent edges.

Common background color choices:

JPEG Quality Settings Guide

The quality slider controls the compression ratio. Higher quality means more data retained, sharper detail, and a larger file.

QualityTypical useFile size vs quality
60–70Thumbnails, previewsVery small, visible artifacts on edges
75–85Blog images, social mediaGood balance for most web content
88–92Product photos, portfolioHigh quality, modest compression
95–100Print preparation, archivingNear-lossless, large file size

Quality 92 is the default because it is the sweet spot used by most professional image editors (including Photoshop’s “Save for Web” default). It is visually indistinguishable from the original at normal viewing sizes while still saving 40–60% of the file size compared to quality 100.

Going above 95 provides diminishing returns — the file gets significantly larger but the visual improvement is invisible to the human eye on screen.

When to Keep PNG Instead

Do not convert to JPEG when:

How PNG to JPEG Conversion Works

function convertPngToJpeg(file, quality = 0.92, bgColor = '#ffffff') {
  return new Promise((resolve) => {
    const img = new Image();
    img.onload = () => {
      const canvas = document.createElement('canvas');
      canvas.width = img.naturalWidth;
      canvas.height = img.naturalHeight;
      const ctx = canvas.getContext('2d');

      // Fill background first — JPEG has no alpha channel
      ctx.fillStyle = bgColor;
      ctx.fillRect(0, 0, canvas.width, canvas.height);

      // Draw image on top
      ctx.drawImage(img, 0, 0);

      // Export as JPEG with quality setting
      canvas.toBlob(resolve, 'image/jpeg', quality);
    };
    img.src = URL.createObjectURL(file);
  });
}

The key step is ctx.fillRect() before ctx.drawImage(). Without it, transparent pixels would be composited against the default canvas background (black), producing dark fringes around transparent areas.

Frequently Asked Questions

Does converting PNG to JPEG lose quality? Yes — JPEG is a lossy format. However, at quality settings of 85 or above, the loss is typically invisible at normal screen viewing sizes. For photographic content, the quality trade-off is worth the significant file size reduction.

Why is my JPEG smaller than the PNG? PNG uses lossless compression, which stores all pixel data exactly. JPEG uses a lossy algorithm (DCT) that discards fine detail that the human eye is unlikely to notice. For photographic images, JPEG is typically 3–10× smaller than PNG at equivalent visual quality.

Can I convert multiple files at once? This tool processes one image at a time. For batch conversion, use ImageMagick: mogrify -format jpg -quality 90 *.png

Is my image uploaded anywhere? No. All conversion uses the HTML5 Canvas API in your browser. The image never leaves your device.

What if my PNG does not have transparency? The background color fill is still applied before drawing the image, but it has no visible effect — the image pixels fully cover the background. You can safely leave the background color at white.

Related Tools

More Image Tools