Images

PNG to JPG Guide: Transparent Backgrounds, JPEG Quality and Batch Export

·

PNG to JPG conversion creates an opaque JPEG from a browser-decoded still PNG. ToolMellow lets you choose the background behind transparent pixels, set JPEG quality and an optional maximum side, apply quarter-turn rotation or flips, then inspect and download individual JPG files or a batch ZIP.

JPEG output can lose detail and does not retain alpha. A smaller file is not guaranteed, especially for text, screenshots and flat graphics. This guide explains the actual controls, strict PNG source validation, flattening, geometry and metadata changes so you can compare the new JPG with the original PNG.

PNG to JPG

Choose PNG sources and inspect the generated JPG

Use Choose images or drop local files into the workspace. Select up to 20 still PNG images and wait for preview reading to settle. JPEG quality starts at 90, JPG background at white, maximum side at 0, rotation at 0 and both flips off. Press Convert to JPG, inspect the result images and dimensions, then download individual JPGs or the completed batch ZIP.

The target is fixed as JPEG, with no output-format chooser or crop editor. The same quality, background, maximum side and transformation apply to every selected file. Changing a setting or editing the queue clears earlier results, so convert again after an adjustment. Keep the original PNG separately.

  • Inspect text, sharp edges and transparency after JPEG encoding rather than judging the quality number alone.
  • Choose the actual background where transparent content should become opaque.
  • Compare the downloaded size and image before replacing a source or using a strict upload threshold.

A preview does not prove that the source is valid PNG

The export worker requires a PNG header and valid decoded dimensions. The picker filter names PNG, but dropped files and misleading extensions can supply another type. A JPG renamed with a .png extension does not become a PNG. A supported-looking PNG header can still fail actual decoding.

The separate preview reader accepts the generic still JPG/PNG/WebP family, so a wrong source can show a thumbnail before strict PNG conversion rejects it. Treat that thumbnail as a visual aid rather than source approval. Header inspection and animation checks are bounded; this tool is not a full PNG/CRC-conformance auditing service.

A preview does not prove that the source is valid PNG
Input caseProcessing behavior
Supported still PNGHeader and decoded limits checked, then new JPG encoded
JPG/WebP with a .png nameCan preview, but strict source processing rejects it
Damaged supported-looking PNGCan fail decoding
Animated PNGRejected rather than silently exporting one frame

MDN: File API and user-selected filesMDN: createImageBitmap orientation and decoding optionsW3C PNG format: lossless images and alpha

Source and batch limits apply before resizing

The full source must fit per-file byte, decoded-pixel and side limits before a smaller output is drawn. Header dimensions and actual bitmap dimensions are checked. MB ceilings are decimal, not MiB. Choosing a tiny maximum side does not make an oversized source acceptable.

Input totals and encoded-JPG totals are separate budgets. The worker accumulates encoded buffers and publishes the result list only after every file succeeds. One source/decoder/encoder/output-budget failure prevents a partial completed batch from appearing. ZIP wrapper overhead is outside the encoded-image sum.

Source and batch limits apply before resizing
BoundaryMaximum
Images per job20
Each source file25000000 bytes, inclusive
Each decoded source24000000 pixels
Either source side12000 pixels
Combined source files100000000 bytes, inclusive
Combined encoded JPGs100000000 bytes, inclusive

MDN: createImageBitmap orientation and decoding optionsMDN: OffscreenCanvas image encoding and quality

Transparent PNG pixels become an opaque background blend

Before drawing the transformed PNG, the worker fills the JPEG canvas with JPG background. Fully transparent source areas therefore show that color, partly transparent pixels blend with it, and opaque areas cover it. JPEG output has no alpha channel. The default white background can be changed with the color control.

This does not remove a subject’s existing opaque background, trim a cutout or recover colors hidden beneath transparency. Choose a background that suits the intended page or document and inspect edge halos. JPEG encoding can alter the rendered colors, so the illustrative pre-encoding effects below are not exact final HEX guarantees.

Transparent PNG pixels become an opaque background blend
Source transparencyBefore JPEG encoding
Alpha0Chosen background is visible
Partial alphaSource blends with the chosen background
Opaque sourceSource covers the background

WHATWG Canvas: default color space, component type and compositingMDN: OffscreenCanvas image encoding and quality

Quality is a lossy encoder request, including at 100

Quality starts at 90 and the slider spans 10–100 in whole steps. Its value divided by 100 is passed to the browser JPEG encoder. It is not a measured retained-detail percentage, pixel-count change or guaranteed file-size reduction. Quality 100 is still a new JPEG encoding, not a promise of lossless PNG preservation.

Try an acceptable setting and compare the processed image, especially around text, thin lines and high-contrast edges. Different content and browser encoders can produce different sizes and artifacts at the same setting. There is no target-byte input, fixed compression percentage, chroma-subsampling selector or automatic quality search.

MDN: OffscreenCanvas image encoding and quality

Check photographs, screenshots and flat graphics separately

JPEG can suit some opaque photographs, while screenshots, small text, logos and flat-color graphics can show visible artifacts or remain smaller as PNG. This converter does not guarantee a size or quality win. Inspect representative details at the scale where the output will be used.

If transparency or exact source pixels are required, keeping the original PNG is a separate choice. A PNG file converted to JPG has neither a recovered alpha channel nor a reversible copy of its original encoding. Converting that JPG back to PNG later does not recreate discarded source detail or transparency.

W3C PNG format: lossless images and alphaMDN: OffscreenCanvas image encoding and quality

Maximum side and rotation determine output dimensions

Maximum image side accepts whole numbers from 0 to 12000. Zero keeps the transformed decoded dimensions; a positive cap fits within that longest side without enlargement and rounds to positive whole pixels. A cap above a smaller source does not upscale it. Rounding can approximate a source ratio for very small outputs.

The examples use decoded source dimensions of 4000 × 3000 unless another source is named. The worker applies the selected clockwise turn and rotated-axis flips before optional downscaling. A 90-degree turn with a 1200-side cap becomes portrait; a maximum side is not an exact width/height preset or crop.

Maximum side and rotation determine output dimensions
Decoded source / rotationMaximum sideActual JPG dimensions
4000 × 3000 / 0°04000 × 3000
4000 × 3000 / 0°12001200 × 900
4000 × 3000 / 90°1200900 × 1200
600 × 400 / 90°1200400 × 600
3 × 2 / 0°11 × 1

MDN: Canvas drawImage source rectanglesMDN: Canvas clockwise rotation and transform originMDN: Canvas scale and negative-axis reflections

Source orientation comes before your rotation and flips

The decoder requests image orientation from source metadata when present and supported. Your Rotate clockwise choice acts on that decoded image, with angles 0, 90, 180 or 270. Quarter turns swap width and height; half turns keep them. There is no fine-angle straightening control here.

Flip horizontally after rotation reflects left/right in the current rotated output; Flip vertically after rotation reflects top/bottom there. Inspect an asymmetric image or readable text to verify direction. These controls are shared across the queue, and sorting/reversing/moving/removing files retains the current global angle and later angle changes.

MDN: createImageBitmap orientation and decoding optionsMDN: Canvas clockwise rotation and transform originMDN: Canvas scale and negative-axis reflections

Animated PNG is rejected with a bounded whole-file check

PNG input can contain animation-control data. The initial header read is limited to about 1 MiB, but the PNG preflight also scans the bounded whole file for acTL before the first IDAT. Large metadata ahead of that animation-control chunk is therefore not treated as proof that the image is still.

This workflow rejects animated PNG rather than silently converting one frame. It has no animation selector or frame-extraction controls. Make an explicit still PNG export first if one frame is intended. The source still needs to decode successfully; the animation check does not certify complete PNG structure or every chunk CRC.

W3C PNG format: lossless images and alpha

Every successful result is newly encoded, with metadata changes

Even at angle 0 with no flips and maximum side 0, this workflow creates a new JPEG. There is no Compress image original-file fallback if the JPG is larger. Original PNG metadata chunks are not copied by the canvas path, while the encoder can add its own format metadata.

The app uses the default sRGB, unsigned-normalized 8-bit canvas component setting rather than requesting a higher-depth canvas. A 16-bit PNG is not exported as a preserved 16-bit source image. Browser decoding/color conversion and JPEG encoding do not certify original profiles, hidden RGB or byte identity. Keep the source if those requirements matter.

WHATWG Canvas: default color space, component type and compositingMDN: createImageBitmap orientation and decoding optionsMDN: OffscreenCanvas image encoding and qualityW3C PNG format: lossless images and alpha

Use the source thumbnail and result preview for different checks

Input previews are PNG thumbnails with a longest side at most 640 pixels and no enlargement of smaller sources. Full decoded dimensions are retained in the source info. Export decodes the actual PNG rather than turning that thumbnail into the JPG, so kept dimensions can exceed the small on-page preview.

The input thumbnail does not apply your final rotation, flips, downscaling or background flattening. Inspect the result preview and actual output dimension/size comparison. Result bytes can be smaller, equal in count or larger; equal count does not imply identical PNG and JPEG content.

MDN: Canvas drawImage source rectanglesMDN: OffscreenCanvas image encoding and quality

Arrange files and download JPG payloads or a ZIP

Use Move up/down, Remove, Sort by filename or Reverse order to arrange the queue. Sorting uses the interface language with numeric comparison and base sensitivity, not a universal bytewise filename order. The same settings apply to every image, while output numbering follows the current order.

Generated filenames use cleaned source basenames, a JPG extension and a prefix: photo.png in first position becomes 01-photo.jpg. MIME is image/jpeg; JPG and JPEG are familiar names for this output format. Each result offers Download, Resize image and Make a PDF. More than one result enables Download all as ZIP, named toolmellow-images.zip, plus Make one PDF for the batch.

MDN: localeCompare and language-sensitive ordering

Handle invalid sources, failed batches and retained settings

If a non-PNG previews but conversion fails, remove it and supply a supported still PNG. Decoder, memory or encoder errors can also occur inside the stated maxima. Smaller supported inputs or a current compatible browser can help. The local worker validates the actual source again when processing.

The whole job has a 60-second timeout. Cancel terminates processing while keeping selected sources; it does not expose a partial completed batch. Clear files removes files, previews and generated results but retains quality, background, maximum side, rotation and flips. New files use those choices. Setting changes require another conversion, and downloaded files are not deleted.

MDN: Using Web WorkersMDN: Worker termination

Local processing and deliberate next-tool handoffs

You choose files on the device; previews, decoding, transformation and JPEG encoding run in a local browser worker. This tool has no remote-URL/cloud-drive image importer or server image-conversion endpoint and does not save an edit project. Ordinary hosting, asset and analytics requests remain separate from image-byte processing, without an anonymity or zero-logging claim.

Resize/PDF buttons deliberately hand generated files to the next tool through one-time in-memory state in the same tab, under the destination’s own limits. Refreshing or leaving discards this workspace. Keep originals separately before experimenting, and review the actual generated image instead of treating a format extension as a quality certificate.

MDN: File API and user-selected filesMDN: Using Web Workers

Embed the converter with a visible ToolMellow backlink

Use Add this tool to your website on the localized tool page to copy or download the supplied HTML snippet. Retain the interactive iframe, sizing behavior and visible ToolMellow backlink with its existing link attributes. Choose the intended language and enough frame space for visitors to inspect images and controls.

Visitors choose their own supported PNGs and receive the same forced-JPEG, background, quality and job-limit behavior. This is not an API for automatically converting images hosted by your webpage. Test the embedded workflow in the browsers and layout you intend to use, and keep the credit link visible.

Common questions

How do I convert PNG to JPG?

Choose supported local still PNG files, set JPEG quality, JPG background and optional maximum side/rotation/flips, then press Convert to JPG. Inspect the opaque result and actual size before downloading individual files or a ZIP.

What happens to transparent PNG pixels?

Fully transparent pixels reveal the chosen JPG background; partly transparent pixels blend with it. JPEG has no alpha channel. The default white can be changed, and encoded colors can differ from the pre-encoding blend.

Can this converter remove an image background?

No. It fills behind existing transparency before drawing the image. An opaque original background remains part of the image; this is not a subject cutout or background-removal tool.

Is JPEG quality 100 lossless?

No. It requests a high browser encoding quality, not a lossless copy of PNG pixels, metadata or profile. The result is newly encoded JPEG even when dimensions and geometry remain unchanged.

Will the JPG always be smaller?

No. Photographs can benefit, but screenshots, text and flat graphics may show artifacts or grow in bytes. There is no exact-size target or smaller-original fallback here. Compare the actual returned file.

Why does a non-PNG file show a preview?

The separate preview reader accepts generic still JPG/PNG/WebP. Export then requires a valid PNG source header, so a thumbnail or renamed extension does not prove this converter will accept the file.

Can I convert an animated PNG?

Not here. PNG preflight checks animation control in the bounded whole file before IDAT and rejects animated input. Make an explicit still PNG export first if you need a single-frame JPG.

How do maximum dimensions and rotation interact?

The decoded image receives the selected clockwise 0, 90, 180 or 270-degree turn and is flipped in the rotated axes, then optionally downscaled to a whole-pixel maximum side. Zero keeps transformed dimensions; positive caps never enlarge a smaller source.

Which background should I choose?

Choose the opaque surface you want behind the image’s already transparent areas, such as the actual page or document background. Inspect partly transparent edges after JPEG encoding; changing the control does not remove an opaque background.

Is original PNG metadata copied?

Original PNG metadata chunks are not copied by this canvas conversion. The JPEG encoder can write its own format metadata; source profile, higher-depth and byte identity are not guaranteed.

How do I download a batch ZIP?

Successfully convert more than one PNG, then use Download all as ZIP. It contains the generated, numbered JPG files. A failed source prevents a partial completed batch from being displayed.

Can I embed the PNG-to-JPG converter?

Yes. Copy the localized HTML from Add this tool to your website, retain the iframe and visible ToolMellow backlink, and test its dimensions. Visitors still select and process their own supported local files.

Are JPG and JPEG different output formats here?

The target MIME is image/jpeg and downloads use the .jpg extension. Both names refer to this JPEG output; changing only a filename is not conversion.

What does Clear files reset?

It removes inputs, previews and results while retaining quality, background, maximum side, rotation and flips. New files use those settings. Already downloaded files remain on your device.

Sources and further reading

Put it into practice.

Related guides