Skip to content

Compress JPG

Compress JPG files to make them smaller without changing their pixel size. The tool re-encodes your JPEG at a lower quality, so the file gets smaller and keeps its .jpg extension. You can also compress PNG and WebP files from the same page, but JPEG is selected by default.

  • Compression is lossy. Detail that is removed cannot be brought back.
  • Anonymous use needs a human check. Signed-in users skip it and use credits.
  • Results vary by picture. A file that is already heavily compressed may not get smaller.

Drop an image here

PNG, JPG, WebP, AVIF, GIF, BMP or TIFF, up to 5 MB

Lower means a smaller file and more visible loss (1 to 100, default 75).

JPEG cannot store transparency. Transparent areas are filled with the background colour below.

#ffffff

Complete the human check to enable the button.

Result

Your JPEG will appear here.

The free web tool takes images up to 5 MB, 30 per day. Signed in, the limit is 10 MB.

Retention: web-tool results are deleted after 10 minutes and no history is kept. API results are kept 1 day on the free plan and 7 days on Starter and Pro (30 days on Business).

  • No account needed

    30 images per day for free, no watermark.

  • Same pixel size

    Compression makes the file smaller without changing the width and height. Camera and location tags are not copied into the result.

  • Deleted automatically

    Web tool results are removed after 10 minutes.

Privacy: what you submit is used only to make this file. The working copy is deleted when the job ends, the result after 10 minutes. See the privacy policy.

Do this from your code

The same request, built from the input and options above. Create an account to get an API key.

curl -X POST https://api.aiipworld.com/v1/render \
  -H "Authorization: Bearer $AIIPWORLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html":"","output":"pdf","options":{}}'

# returns {"job_id": "...", "status": "queued"}; then poll:
curl https://api.aiipworld.com/v1/jobs/JOB_ID -H "Authorization: Bearer $AIIPWORLD_API_KEY"

Batches

The web tool handles 1 image at a time. The API takes one request per image, so you can script as many as your plan allows.

Retention

Web-tool results are kept 10 minutes; free API results 1 day; Starter and Pro results 7 days; Business 30 days. The web tool allows 10 conversions per minute and 50 per day per visitor.

In one sentence

A free online tool that makes a JPG file smaller at the same pixel size, by quality or by a target size in KB, and also compresses PNG and WebP.

Key facts

  • Input: JPG, PNG, WebP, AVIF, GIF, BMP or TIFF, up to 5 MB in the free tool and 10 MB when signed in, and up to 16 MP (4096 x 4096); the type is read from the file content, and HEIC, SVG, PDF and camera RAW files are not accepted.
  • Output: a JPG by default (mozjpeg, progressive) with the same width and height; quality 1 to 100 (default 75) or a target size in KB (at most 7 trial encodes; if the target cannot be reached the smallest result is returned and the panel says so). The result is lossy, and when it is not smaller than the original the panel says so.
  • In our test a generated 1600 x 1200 px photograph saved as a 538 KB JPEG became a 120 KB JPG at quality 75 and 38 KB at quality 50, while quality 95 gave a 549 KB file that was not smaller; the test pictures were generated by our scripts.
  • The upload is deleted when the job ends and the result after 10 minutes; signed-in users pay 1 credit per image.
  • Free without an account: up to 10 conversions per minute and 50 per day per visitor, no watermark. Signed in, each render costs 1 credit (100 free credits every month).
  • Files are deleted automatically: 10 minutes after conversion without an account, 1 day with a free account.
  • Developers can run the same render with POST https://api.aiipworld.com/v1/render and an API key (see the API docs page).

How it works

  1. Open the tool with JPEG selected as the output format.
  2. Upload one image. The page shows a preview and the image size before you compress.
  3. Set a quality from 1 to 100. The default is 75. Or enter a target file size in KB instead.
  4. Press the button to compress the image, then check the result panel for the new size and the percent saved.
  5. Download the file and keep your original.

Example output

Original JPG, 1600 x 1200 px, 538 KB

The sample photograph before compression

Compressed JPG, quality 75, 120 KB

The sample photograph after JPG compression
A generated test photograph (1600 x 1200 px JPEG saved at quality 92, 538 KB) compressed with JPEG at quality 75: a 120 KB JPG, 78% smaller, with the same pixel size. Converted by this site's own engine. Open the converted file (or select the picture) to see it at full size.

How to compress a JPG

Upload your JPG, leave the output format on JPEG, and choose a quality. The default quality is 75, which is a place to start. Press the button and the result panel shows the original size, the new size and how much smaller the file is.

The page opens with JPEG selected, so you do not need to change anything for a basic compress. If you want a different output, you can switch to PNG, WebP or "Same as the original". Download the result when you are happy with it.

  • Start at the default quality of 75.
  • Check the result panel before you replace your original file.

What JPG compression does

JPG compression re-encodes the picture at a lower quality. The encoder used is mozjpeg, and the result is a progressive JPEG. The pixel size of the picture never changes, so a 1600 x 1200 photo stays 1600 x 1200.

MDN calls JPEG the most widely used lossy compression format for still images. Photographs and other continuous-tone images can usually tolerate lossy compression, because the discarded detail is harder to see. Compression is still lossy. Detail that is removed cannot be brought back, and saving a JPEG again loses a little more, so keep the original file.

Choosing the quality

Quality runs from 1 to 100, and the default is 75. Lower numbers make a smaller file with more visible loss. Higher numbers keep more detail but leave a larger file.

In our test, a 1600 x 1200 photo saved as JPEG at quality 92 was 538 KB. At quality 50 it became 38 KB, at quality 75 it became 120 KB, and at quality 85 it became 227 KB. Results vary by picture, so compare a few settings on your own image before you choose one.

  • Quality 75 is the default and a good place to start.
  • If the result looks rough, raise the quality and compress again from your original.

Compress a JPG to a target size in KB

You can enter a target file size in KB instead of a quality. The tool searches for a quality that gets the file close to your target. The search uses at most 7 trial encodes, and the target size must be between 1 and 20480 KB.

In our test, a target of 100 KB gave 99 KB, a target of 200 KB gave 192 KB, and a target of 400 KB gave 387 KB. A target of 5 KB could not be reached: the smallest result was 6.4 KB, and the panel said the target was not reached. The tool never silently relaxes a target. If the search stops early to stay inside the time limit, the panel says so.

When the file does not get smaller

Sometimes the compressed file is not smaller than the original. This happens most often when the JPG was already compressed hard. The result panel says so plainly, and the file is still offered for download.

In our test, a picture saved at quality 40 (57 KB) became 70 KB at quality 75. That result was about 22% larger, and the panel said it was not smaller. At quality 30 the same picture became 21 KB. If the panel warns you, try a lower quality or keep the original.

  • A file that is already compressed may not shrink further.
  • If the original is already small, the compressor cannot help much.

Compress image files: JPG, PNG and WebP

This page is set up for JPG, but the same compressor also works on PNG and WebP. Choose the output format that suits your file. The compressor does not change the pixel size of your picture in any format.

For PNG, the compressor reduces colours to a palette of at most 256 colours, with dithering. This is lossy. You can also tick "Lossless" for PNG, which keeps all colours and only uses stronger deflate. For WebP, the compression is lossy unless you tick "Lossless". A photograph is usually a poor fit for PNG, so JPEG or WebP is often the better choice.

Why people compress JPG files

Smaller JPG files are easier to upload, email and store. Some forms and websites set a maximum file size, and a compressed JPG may fit under that limit without changing the picture dimensions. The target size setting is meant for that case.

Use the quality setting to balance file size and picture detail for your use. Keep the original so you can compress again with different settings later.

Rotated photos, camera tags and transparent pictures

A photo stored with EXIF orientation is turned upright in the result. In our test, a 1600 x 1200 file marked with orientation 6 came out upright as 1200 x 1600, and its size went from 465 KB to 120 KB at quality 75.

Camera and location tags, such as EXIF and GPS data, are not copied into the result. JPEG does not support an alpha channel, so transparent areas are always filled with the background colour. The default background is white. In our test, a transparent 1024 x 1024 PNG logo of 37 KB became 17 KB as a JPEG at quality 75, with the transparent area filled with white.

Compressing is not the same as making the picture smaller

Compressing a JPG makes the file smaller in bytes. It does not make the picture smaller in pixels. A 1600 x 1200 photo is still 1600 x 1200 after compression. If you need fewer pixels, use the Size setting on the converter pages, such as the PNG to JPG tool. This compressor has no resize setting.

Compression removes some detail from the image data, so check the result at the size you plan to use.

Which files the compressor accepts

The tool accepts PNG, JPG (also .jpeg and .jfif), WebP, AVIF, GIF, BMP and TIFF. It does not accept SVG, PDF, HEIC/HEIF, BigTIFF or camera RAW files. The file type is read from the content, not the file name, so a renamed file is read as what it really is.

The free web tool accepts up to 5 MB per image, and up to 16 MP (4096 x 4096) per image. Signed-in users can upload up to 10 MB per image. Free use allows 30 images per day per visitor. Signed-in users pay 1 credit per image, plus 1 credit for each 5 MB of result after the first 5 MB. The result can be at most 20 MB. If it would be larger, the job fails with an "output too large" message instead of returning a cut-off file.

  • The web tool handles one image at a time.
  • An animated GIF or WebP keeps its frames when the output is WebP or "Same as the original". With JPEG or PNG output, and for an animated AVIF, only the first frame is used. The GIF compressor page has the GIF settings.

Compress JPG from code

You can compress JPG files through the API. Use the image compress operation, op=image_compress, with format=jpeg for JPG output. Set quality from 1 to 100 or target_kb from 1 to 20480, not both. Other settings include lossless, keep_transparency and background.

Send the raw image bytes as the request body, not JSON or multipart. Set Content-Type to the image type, such as image/jpeg. Authenticate with an Authorization Bearer header or an x-api-key header. The API returns a job ID, and you poll the job until it succeeds or fails. The download link is short-lived. The tool page shows a ready cURL, Node and Python example below the tool. Full details are in the API docs at /docs/#image-compress.

Privacy: what happens to your file

Your image is sent to our server, and it is not processed in the browser. The processing is done by sharp, built on the libvips library. This is ordinary image processing, not artificial intelligence. The uploaded image is used only to make the result and is deleted as soon as the job ends, whether it succeeds or fails.

The result is deleted after 10 minutes in the free web tool. No history is kept, and download links are short-lived. Download your file before the link expires. You must have the right to use any image you upload, as set out in our Acceptable Use Policy.

Questions

Can I compress a JPG for free?

Yes, you can compress a JPG for free in the web tool, with no signup. Anonymous use needs a quick human check, and the free limits apply.

How much smaller will my JPG get?

The size depends on the picture and the quality you choose, so results vary. In our test, a photo went from 538 KB to 120 KB at quality 75, but your result may be different.

What quality should I use?

Start with the default quality of 75. Try a higher number if you see loss in detail, or a lower number if you need a smaller file.

Can I compress a JPG to a specific size in KB?

Yes, you can enter a target size in KB from 1 to 20480. The tool gets close to the target, but it cannot always reach very small targets. If it cannot, the panel tells you.

Why is my compressed JPG not smaller?

The original file is probably already compressed hard, so there is little left to remove. Try a lower quality, or keep the original file if the panel says the result is not smaller.

Does compressing change the picture size in pixels?

No, compressing never changes the pixel size. A 1600 x 1200 picture stays 1600 x 1200. Only the file size changes.

Is JPG compression lossless?

No, JPG compression is lossy. Detail that is removed cannot be brought back, so keep your original file.

Can I compress image files that are not JPG?

Yes, the same compressor also works on PNG and WebP. You can choose PNG, JPEG, WebP or "Same as the original" as the output format.

What happens to camera and location data?

Camera and location tags, such as EXIF and GPS data, are not copied into the result. Photos stored with an orientation tag are turned upright.

What happens to a transparent picture?

JPEG has no transparency, so transparent areas are always filled with the background colour. The default background is white.

Is this a JPEG compressor that can reduce JPG size?

Yes. It makes JPG files smaller in bytes at the same pixel size. JPG and JPEG are the same format, so jpeg compress and reduce jpg size mean the same job here, and the same page works as an image compressor for PNG and WebP.

How long is my file kept?

The uploaded image is deleted as soon as the job ends. The result is deleted after 10 minutes in the free web tool.

Can I compress JPG files in code?

Yes, the API accepts raw image bytes with the image compress operation, op=image_compress and format=jpeg. The tool page shows ready cURL, Node and Python examples.

Need this in your app or in bulk?

This tool runs on the same platform as the API, so the same image is one HTTP request from your code. A free account includes 100 credits a month.

Related tools