Skip to main content

Image Format Converter

Convert images between PNG, JPEG, and WebP formats in one click.

Reviewed by · Last reviewed

🔄

Drop an image here or click to upload

Supports JPG, PNG, WebP

How to Use the Image Format Converter

  1. Drop the source file into the upload area. JPEG, PNG, WebP, and GIF are all accepted; the tool sniffs the MIME type from the file rather than trusting the extension.
  2. Pick a target format with the radio buttons: PNG for lossless archival, JPEG for maximum compatibility, or WebP for modern web delivery.
  3. Review the preview. The new format is rendered live so you can spot issues like transparency being flattened when converting from PNG to JPEG.
  4. Click "Convert". The image is decoded, drawn into a canvas, and re-exported through canvas.toBlob(mimeType, 0.92) for JPEG and WebP. The 0.92 default is a compromise that keeps visible artifacts away on most photos.
  5. Download the converted file. The output is served through an object URL so the download works offline once the page has loaded.

Under the Hood: Why Format Conversion Is Not Free

Every format has its own container and its own compression algorithm, so "convert PNG to JPEG" is a two-step operation: decode the source fully into an RGBA pixel buffer, then re-encode that buffer through a different codec. The browser exposes exactly that pipeline through the HTML5 Canvas 2D context. We load the image via createImageBitmap (asynchronous and off-main-thread where supported), paint it onto a canvas sized to match the source, and call canvas.toBlob with the target MIME type. The quality parameter is only meaningful for lossy targets - JPEG and WebP honor it, while PNG ignores it because PNG compression is entirely lossless.

The catch is that any format-specific metadata is discarded along the way. EXIF tags from a camera JPEG, color intent chunks from a PNG (like iCCP for ICC profiles or gAMA for gamma), animation frames from a GIF, and XMP metadata blocks all disappear when the pipeline re-encodes from raw pixels. For web delivery that is usually fine and often desirable; for archival workflows it can be a problem.

Common Conversion Scenarios

  • Turning a screenshot PNG into a WebP for a markdown blog post, trimming the file from 800 KB to 80 KB without visible loss.
  • Converting an iPhone HEIC photo (after an intermediate step in Photos or Preview) into a universally readable JPEG for an old WordPress upload form.
  • Flattening a transparent PNG logo to a JPEG so it can be used as a background in an older email client that chokes on alpha channels.
  • Exporting design mockups from a lossless PNG master to WebP for production, where the smaller file improves Core Web Vitals.
  • Normalizing a mix of JPEG, PNG, and WebP user uploads to a single canonical format before storing them on a CDN.
  • Converting a quick GIF screen capture to a still PNG of the first frame for documentation where animation is not needed.

Format Conversion Edge Cases

  • Transparency vanishes when you target JPEG. JPEG has no alpha channel, so transparent pixels are composited onto a white (or whatever background the canvas starts with) background. This is often surprising with logos or icons.
  • Animated GIFs become single stills. The canvas captures only the frame that was current when createImageBitmap resolved. For animation preservation, use a GIF-aware tool like gifsicle or ffmpeg.
  • Color profiles are lost. A wide-gamut Display P3 photo converted through Canvas is silently clamped to sRGB. That is invisible on most displays but flattens saturation on a Pro Display XDR or an iPhone in HDR mode.
  • Converting JPEG to PNG increases file size. PNG is lossless, so it cannot efficiently store photographic noise - a 2 MB JPEG might balloon to 6 MB as a PNG, with zero quality gain (the artifacts in the source are faithfully preserved).
  • Safari old versions miss WebP encode. Safari versions before 14 cannot export WebP from Canvas, so this tool gracefully falls back to PNG if the target is unsupported.

A Format Cheat Sheet

JPEG (ISO/IEC 10918-1, packaged in the JFIF container) has dominated photography since 1992 because its DCT-plus-quantization pipeline matches human visual perception well. PNG (W3C PNG Specification) won the lossless-on-the-web crown with DEFLATE-compressed scanlines, alpha transparency, and an extensible chunk-based container. WebP (RFC 9649) is Google\'s unified successor, offering lossy mode borrowed from VP8, a lossless mode with domain-specific predictors, and animation frames in the same file. AVIF (CCITT Rec. AV1 Image File Format) uses AV1 intra-frame coding for still images and typically halves JPEG file size at the same quality, with 10-bit color and HDR metadata; it now has broad (but not universal) browser support. SVG (W3C SVG 2 Recommendation) is the odd one out - a vector format, so converting a raster image to SVG requires tracing, and converting SVG to raster requires rendering at a specific resolution.

Browser Conversion vs. Other Paths

The browser pipeline is ideal for one-off conversions where privacy and speed matter more than codec tuning. For batch jobs, ImageMagick\'s magick mogrify -format webp *.jpg rips through a folder in seconds, libvips (via sharp) adds streaming I/O and an order-of-magnitude speedup on large files, and cwebp from Google\'s libwebp ships a reference encoder with knobs this tool does not expose. Squoosh.app sits in between - browser-based like us, but with exposed codec parameters (Mozjpeg, cjxl, AVIF speed settings) for users who want to tune. Specialized services like TinyPNG use proprietary perceptual encoders that beat both browser canvas and stock CLI tools on PNG palettization. Use this tool when you want instant privacy-preserving conversions, and step up to a CLI or Squoosh when you need codec-level control or batch throughput.

Frequently Asked Questions

Does converting my image upload it anywhere?

No. The file sits in a local blob, is decoded via <code>createImageBitmap</code>, drawn onto a canvas, and re-encoded by the browser's native codec. Nothing goes over the network. You can verify by opening DevTools, running a conversion, and watching the Network tab stay completely silent during the operation.

What does the tool do with transparency when I convert PNG to JPEG?

The transparent pixels are flattened onto the canvas background, which is white by default. JPEG has no alpha channel anywhere in the spec - there is no way to keep transparency in a JPEG file. If you need to preserve alpha, choose PNG or WebP as the target format instead.

Will converting from lossy JPEG to lossless PNG recover quality?

No, that is a common misconception. The JPEG decode produces exact pixel values that already contain all the compression artifacts, and PNG faithfully preserves those pixels without adding new ones. Your PNG will be a perfect copy of the already-degraded JPEG, typically three to five times larger on disk with zero visual improvement.

Why does my WebP output look slightly different from a desktop cwebp output?

The browser uses its own WebP encoder, which is libwebp wrapped by the graphics stack. Quality-for-quality it is close to cwebp on the command line but not identical - cwebp exposes parameters like <code>-af</code> (auto-filter), <code>-sharpness</code>, and multi-pass encoding that Canvas does not. For pixel-identical output across environments, a server-side encode is the only way.

Can the tool preserve EXIF data like GPS and camera info?

No. The Canvas re-encode starts from raw RGBA pixel data and the browser does not pipe through EXIF. If you need metadata preserved during conversion, use ExifTool after the conversion to copy the original tags, or use a format-preserving CLI like <code>magick convert -strip false</code> to keep them inline.

What quality level does the tool use for JPEG and WebP output?

A default of 0.92 is passed to <code>canvas.toBlob</code>, which the browser interprets as a high-quality setting - visually very close to the original for most photos, with file sizes significantly smaller than raw PNG. If you want explicit control over quality, use the separate Image Compressor tool which exposes a slider.

Does the converter keep my ICC color profile intact?

No, color profiles are stripped. The canvas re-encoding clamps everything to sRGB during export, which is fine for sRGB sources but silently desaturates images from Display P3, ProPhoto, or Adobe RGB captures. For color-critical print work, a desktop tool with <code>-profile</code> support is the correct path.

How do I convert an animated GIF and keep the animation?

This tool captures only the first frame because Canvas cannot iterate animation timelines. For animated GIF conversion, use a dedicated tool: ezgif.com on the web, gifsicle on the command line, or <code>ffmpeg -i input.gif output.webp</code> for converting to animated WebP.

Which output format is best for modern websites?

For 2026, AVIF if you can afford the slower encoder and accept slight compatibility gaps, WebP as the pragmatic default, and a <code>&lt;picture&gt;</code> element that serves both with a JPEG fallback for the long tail of old browsers. This tool does not yet output AVIF because Chromium only shipped Canvas AVIF export recently, so WebP is the leanest choice it offers.

Why is the converted file sometimes larger than the source?

It happens in two scenarios. First, converting a heavily compressed JPEG to lossless PNG always grows because PNG cannot match JPEG's lossy ratio. Second, converting a small PNG (under 10 KB) to WebP can actually grow because the WebP header overhead dominates the tiny payload. For general use, stay in lossy formats when starting from a lossy source.

Can I use this tool offline?

Yes, once the page has loaded everything required is present. The Canvas API and the JPEG/PNG/WebP codecs ship with the browser itself. There are no external scripts, no CDN lookups at conversion time, and no telemetry pings. Turn on airplane mode after the page loads and every conversion will still work.

More Image Tools