Finally a truly free unlimited converter! Convert unlimited images online – 100% free, no sign-up required

How JPG Compression Works: What Really Affects File Size and Image Quality

Date published: June 30, 2026
Last update: June 30, 2026
Author: Marek Hovorka

Category: Image Optimization
Tags: file size, Image optimization, image quality, JPEG artifacts, jpg compression

Learn how JPG compression actually works, why artifacts appear, what quality settings really mean, and how to choose better export settings for web, sharing, and uploads.

JPG is one of the most widely used image formats in the world, but many people still treat compression like a mystery. You move a quality slider, the file gets smaller, and sometimes the image still looks fine. Other times, it suddenly looks soft, blocky, or full of strange halos around edges.

That confusion matters because JPG compression affects everything from website speed and storage costs to photo sharing, upload limits, and how professional your images look. If you understand what JPG is actually doing behind the scenes, you can make much better choices about export settings, conversion workflows, and when another format makes more sense.

This guide explains JPG compression in plain English. You will learn how it shrinks files, why quality drops, what artifacts really are, and how to decide when to keep using JPG versus converting to something else.

Need a quick format change?

If your image is in the wrong format for an upload, website, or editing task, PixConverter can help in a few clicks.

Convert PNG to JPG | Convert JPG to PNG | Convert PNG to WebP | Convert WebP to PNG | Convert HEIC to JPG

What JPG compression is designed to do

JPG, also called JPEG, was built to make photographic images much smaller than raw or lossless formats. Its main goal is simple: reduce file size enough for practical storage and transmission while keeping the image visually acceptable.

The key phrase is visually acceptable. JPG is not trying to preserve every original pixel exactly. It is trying to remove or simplify image information in ways people may not notice immediately.

That is why JPG is called a lossy format. During compression, some original image data is permanently discarded. Once that happens, you cannot fully recover it by saving at a higher quality later.

Why JPG files can be so small

JPG files often end up much smaller than PNG files for photos because JPG uses a compression method that takes advantage of how human vision works.

In practical terms, JPG assumes:

  • People notice brightness changes more easily than tiny color changes.
  • Many nearby pixels in photos are visually similar.
  • Fine detail can be simplified more aggressively in some areas than others.

That lets JPG throw away some color detail, simplify textures, and compress repeating visual patterns efficiently. For real-world photos, this usually works well. For screenshots, logos, text graphics, and sharp-edged illustrations, it often works poorly.

JPG compression step by step

You do not need the math to make better image decisions, but it helps to understand the workflow at a high level.

1. The image is converted into a color model suited for compression

JPG typically transforms the image from RGB into a color space that separates brightness from color information. This matters because the format can preserve brightness more carefully while compressing color more aggressively.

That is one reason photos can stay believable even after heavy compression.

2. Color detail may be reduced

This step is often called chroma subsampling. Since human eyes are less sensitive to slight color detail than brightness detail, JPG can reduce color precision without always creating obvious visual damage.

On photos, this may be hard to notice. On graphics with crisp colored edges or small text, it can create visible blur or fringing.

3. The image is broken into small blocks

JPG usually processes the image in small square blocks. This is a major reason compression artifacts often look blocky. Each block is compressed partly on its own, rather than as one perfectly continuous image.

4. Fine detail is simplified

Inside those blocks, the format analyzes visual detail and decides what can be reduced. Subtle textures, tiny transitions, and high-frequency detail are often the first things to go when file size is pushed down.

This is where smooth skin, clouds, grass, fabric, and hair can start to look smeared or artificial.

5. Redundant patterns are encoded efficiently

After simplification, the remaining data is stored in a compact way. The less detail left, the easier it is to compress the image further.

This is why a heavily compressed JPG can become dramatically smaller than a lightly compressed one.

What the JPG quality slider actually means

Most apps, export panels, and online tools show a quality setting, often on a scale like 1 to 100. This number is useful, but it is not universal.

A setting of 80 in one app may not look exactly like 80 in another. Different software may apply different defaults, different subsampling behavior, or different compression tuning.

Still, the general rule is reliable:

  • Higher quality = larger file, fewer visible artifacts.
  • Lower quality = smaller file, more visible degradation.

The important thing is that the relationship is not linear. Dropping from 100 to 90 may save a lot of size with almost no visible change. Dropping from 60 to 50 may introduce much more obvious damage.

Common JPG artifacts and what causes them

When people say a JPG looks compressed, they are usually noticing one or more predictable artifact types.

Artifact What it looks like Why it happens
Blocking Visible square patterns Image is compressed in small blocks
Blurring Loss of crisp detail Fine textures are simplified or discarded
Halos Light or dark outlines near edges Compression and sharpening interact badly
Banding Uneven steps in gradients Smooth tonal transitions lose precision
Color bleeding Edges look fuzzy or tinted Reduced color detail from subsampling

These issues become more visible in images with sharp transitions, repeated edits, heavy compression, or too much export sharpening.

Why some images survive JPG compression better than others

Not all images respond the same way to JPG compression. A soft outdoor photo may look great at a modest file size. A screenshot of a dashboard or spreadsheet may look bad very quickly.

Images that usually compress well as JPG

  • Photos from phones or cameras
  • Portraits
  • Travel images
  • Natural scenes
  • Social media photos

Images that usually compress poorly as JPG

  • Screenshots
  • Logos
  • Icons
  • Text-heavy graphics
  • Images with transparent backgrounds
  • Flat illustrations with hard edges

That is because JPG is strongest with continuous-tone imagery and weakest with precise edges and clean graphic detail.

Lossy vs lossless: the practical difference

JPG compression is lossy. PNG compression is lossless. That distinction matters a lot.

With lossless compression, the file gets smaller without discarding original pixel information. With lossy compression, the format removes image data to save much more space.

If you need exact edges, clean text, repeated editing, or transparency, a lossless option is often safer. If you need small file sizes for photographic content, JPG is still a practical choice.

If you already have a JPG and need cleaner editing behavior for overlays or graphics work, converting it to PNG can help with compatibility going forward, although it will not restore lost quality. You can use PixConverter’s JPG to PNG tool for that workflow.

What happens when you resave a JPG multiple times

This is one of the most important real-world JPG rules: every resave can cause additional quality loss.

If you open a JPG, edit it, and save it again as JPG, the image is recompressed. That means new artifacts may be added on top of existing ones. Repeating that process can gradually make the image softer, dirtier, and less stable.

This is why photographers and designers usually keep a master file in a non-lossy format or in their editing software, then export JPG only at the end.

Best practice:

  • Keep an original master.
  • Do not repeatedly edit and re-save the same JPG.
  • Export a fresh JPG from the original when needed.

How to choose the right JPG compression level

There is no single perfect quality setting for every image. The right level depends on where the image will be used and how closely people will inspect it.

For websites

You usually want the smallest file that still looks good at normal viewing size. Overly large images slow pages down, hurt user experience, and can reduce performance metrics.

Good approach:

  • Resize the image to the display dimensions first.
  • Export at a moderate to high quality setting.
  • Check faces, text, edges, and gradients.
  • Avoid using massive originals when the site shows small thumbnails.

For email and messaging

Smaller files are often worth a slight quality tradeoff. Most recipients will view the image on a phone or in a compressed app environment anyway.

For print

Be more conservative. Compression damage that looks minor on screen can become easier to notice in print, especially in gradients and detailed textures.

For archives

JPG is not ideal as your only master copy if you may need to re-edit the image later. Keep a higher-quality source if possible.

When converting can be smarter than compressing harder

Sometimes the real problem is not that your JPG settings are wrong. It is that JPG is the wrong format for the task.

For example:

  • If you have a PNG photo that is too large for web use, converting to JPG may reduce size dramatically. Try PNG to JPG.
  • If you have a transparent graphic, JPG will remove transparency. A better option may be PNG to WebP for smaller size while keeping transparency.
  • If you received a WebP file that is awkward to edit in your current app, WebP to PNG can make it easier to use.
  • If your iPhone photos are in HEIC and a site only accepts JPG, use HEIC to JPG.

Quick tip: If a file still looks bad after strong JPG compression, do not keep lowering quality. First ask whether the image should stay JPG at all.

JPG vs other formats for compression decisions

Format Best for Compression type Key limitation
JPG Photos and general sharing Lossy No transparency, quality loss
PNG Graphics, screenshots, transparency Lossless Larger for photos
WebP Modern web delivery Lossy or lossless Less convenient in some older workflows
HEIC Efficient phone photo storage Highly efficient compression Compatibility can be inconsistent

Practical ways to get better JPG results

Resize before export

If your image will display at 1600 pixels wide, do not upload a 6000-pixel original and rely only on compression. Downsizing first usually saves more size with less visible damage.

Avoid over-sharpening

Strong sharpening can make JPG artifacts more obvious, especially halos and edge noise.

Test on the actual background

An image may look acceptable on a white editor canvas but show flaws more clearly on a dark website section or in a zoomed mobile view.

Watch gradients carefully

Skies, studio backdrops, and soft shadows are good places to inspect for banding.

Do not use JPG for transparent assets

If you need transparency, stick with PNG or another suitable format. Converting transparent artwork to JPG will flatten the background.

Keep one untouched source file

This makes it easy to create a web version, a print version, and a sharing version without compounding compression loss.

Signs you compressed too far

Not sure whether your JPG settings are too aggressive? Look for these warning signs:

  • Skin looks waxy or smeared
  • Hair and grass lose separation
  • Straight edges show ringing or halos
  • Text looks fuzzy
  • Gradient areas break into visible steps
  • Dark areas become blotchy
  • Repeated textures turn muddy

If you see several of these, increase quality, resize more intelligently, or switch formats.

FAQ about JPG compression

Does JPG compression always reduce quality?

Yes. JPG is a lossy format, so some image data is removed during compression. At higher quality settings, that loss may be hard to notice, but it still exists.

Why does one JPG quality setting look different in different apps?

Quality numbers are not perfectly standardized across software. Different tools may use different compression tuning, color handling, or subsampling defaults.

Can converting a JPG to PNG improve quality?

No. Converting a JPG to PNG does not restore lost detail. It only places the existing image into a lossless container so future saves do not add more JPG compression damage.

Why do screenshots look bad as JPG?

Screenshots often contain crisp text, UI edges, and flat colors. JPG is not ideal for that type of image. PNG usually preserves those details better.

Is JPG still good for websites?

Yes, especially for photographs. It remains a practical web format when you want broad compatibility and small photo file sizes. For some workflows, newer formats like WebP may provide better efficiency.

What is the best JPG quality setting?

There is no universal best setting. A moderate-to-high quality level often works well for web photos, but the right choice depends on the image content, dimensions, and how the file will be viewed.

Can I undo JPG artifacts?

Not fully. Some editing tools can reduce the appearance of artifacts, but they cannot recover all discarded data. The best fix is going back to the original image and exporting again more carefully.

Final takeaway

JPG compression is not random. It shrinks files by discarding visual information that is often less noticeable in photos than in graphics. That tradeoff is what makes JPG so useful and so risky at the same time.

If you remember just a few rules, make them these:

  • JPG is best for photos, not sharp graphics.
  • Lower file size always comes with some quality tradeoff.
  • Repeated re-saving makes JPG files worse over time.
  • Resizing smartly often helps more than crushing quality.
  • Sometimes the right answer is switching formats, not compressing harder.

Use PixConverter for the next step

If JPG is not the best fit for your file, convert it fast with PixConverter and move on without workflow friction.

Convert PNG to JPG

Convert JPG to PNG

Convert WebP to PNG

Convert PNG to WebP

Convert HEIC to JPG

Choose the format that matches the job, keep quality under control, and make your images easier to upload, share, and publish.