What compress images actually change in a file
Compress images for the web by encoding pixels as a smaller JPEG. Toolioz draws the picture on a canvas and calls toBlob with a quality number, so the download is always JPEG, even when the input was PNG or WebP. Alpha transparency is discarded. A target size in KB searches quality and scale, and can still miss the cap, in which case the page saves quality 0.05 at 10% scale. The rest of this guide explains the "without losing quality" claim, form caps, and when to compress images before image to PDF.
Compression is not a zipper on the original file. JPEG, described by the JPEG committee, throws away detail the eye is less likely to notice, then stores coefficients in a compact stream. PNG is a different design: it can be lossless. Feeding a PNG into a canvas JPEG encoder produces a new, lossy file. That is useful for photos and harmful for a screenshot of sharp UI text if the quality is pushed too low.
The HTML canvas `toBlob` call is the entire engine on Toolioz. There is no cloud optimizer and no second codec. Quality 0.8 is the default stored in localStorage. A target in KB, if set, overrides that slider and runs a nested search: scale steps down from 1.0 toward 0.1, and at each scale a binary search over quality looks for a blob at or under the cap.
Honesty about the output matters more than a slogan. The saved image is not lossless. A preview is shown before download so the loss is visible. If the preview is unacceptable, change the setting. Do not download a mushy file and hope a portal will magically restore edges.
How to compress images for a file size cap
Compress images for a named cap by entering that number in KB and checking the preview. The search can start at 50% or 30% scale when the target is far below the original file. If nothing fits, the saved JPEG uses quality 0.05 and 10% scale, which can still be larger than the target.
Forms rarely want "as small as possible." They want under 100 KB, or under 200 KB, with a face still recognizable. A slider without a byte target forces guesswork. A target without a preview forces people to upload blindly. Toolioz shows original and compressed previews in the same tab. Use that comparison at 100% zoom, not from a thumbnail.
Work happens through the File API in the browser. The picture is not uploaded to Toolioz for processing. Closing the tab discards the working image. That is expected: there is no cloud bin of ID photos to leak later.
- Open the image compressor.
- Add one JPEG, PNG, or WebP.
- Leave quality at 0.8 for a first look, or type the form cap in KB.
- Run compress and compare the preview with the original at full size.
- Download the JPEG only if text and edges still hold. Do not re-compress that download.
What happens if compress images miss the target size?
The page still produces a JPEG. After the search fails, it encodes at quality 0.05 and 10% of the original pixel dimensions. That file can remain larger than a 20 KB cap if the picture is huge and busy. Crop first, or accept that some photos cannot hit an extreme cap without becoming unreadable.
Compress images without losing quality
Compress images without losing quality is a search phrase, not a JPEG fact. JPEG is lossy. The practical goal is to compress images until the file fits, while type, faces, and edges stay usable at the size they will be viewed.
Lossless reduction exists in other tools: stripping metadata, indexing PNG colors, or using lossless WebP. Toolioz does not do those. It always writes JPEG. Calling that lossless would be false. The useful version of the phrase is "compress images without losing the quality this job needs." A 1200-pixel-wide blog photo can look fine at quality 0.7. A 600-pixel-wide scan of 8-point type cannot.
Viewing size is the hidden variable. A 4000-pixel phone photo displayed at 800 pixels can hide a lot of JPEG damage. The same file printed or zoomed on a passport form will not. Always preview at 100% for anything with small type. Zoom past 100% to inspect a signature.
Generational loss is the other trap. Opening a JPEG, saving it, opening that save, and saving again repeats quantization. Toolioz's canvas path is already a new encode, even at quality 0.95. Run it once. Keep the original in a separate folder. If the first pass is too aggressive, go back to the original, not to the compressed file.
- Photos tolerate JPEG well. Sharp screenshots and small type do not.
- PNG input becomes JPEG output. Transparency becomes an opaque backdrop.
- WebP input is decoded, then saved as JPEG. It is not kept as WebP.
- A second pass on the download adds artifacts without much extra shrinking.
JPEG PNG and WebP when compress images
Compress images from JPEG, PNG, or WebP on Toolioz. The saved file is JPEG in every case. Pick the input for the job, then accept that the output codec is JPEG.
JPEG is the right output for photographs and for most ID portraits. It does not store alpha. A PNG logo with a transparent background will gain a backdrop (usually black or white depending on how the canvas was cleared) and look wrong on a colored page. Keep logos as PNG in a real graphics tool if transparency is required. This compressor is the wrong page for that file.
WebP, documented by Google's WebP guide, can be smaller than JPEG at a similar look. Toolioz still decodes WebP and writes JPEG, because the compressor's contract is a single, widely accepted upload format. Many government and college portals still reject WebP. JPEG is the boring file that those forms accept.
PNG screenshots of code or UI should stay PNG when the goal is crisp text. If a portal only accepts JPEG, compress images at a high quality and do not downscale unless the byte cap forces it. Downscale is more destructive to 1-pixel lines than a mild JPEG quality drop.
| Input | What Toolioz reads | What is saved | Transparency |
|---|---|---|---|
| JPEG / JPG | Yes | JPEG | Not present |
| PNG | Yes | JPEG | Dropped |
| WebP | Yes | JPEG | Dropped |
| SVG, HEIC, GIF | No | Nothing | Not handled |
Compress images before image to PDF
Compress images before converting a stack of photos into a PDF. A PDF that stores JPEG bytes cannot be smaller than those JPEGs. Merge of already-heavy photo-PDFs will not fix that. See how merge PDF files copy pages.
Camera pages of a marksheet are often 3 MB to 8 MB each. Five of those in image to PDF become a 15 MB to 40 MB document. The same five, compressed to about 400 KB while digits stay readable, become a 2 MB-class PDF. The conversion step embeds JPEG with embedJpg when the file is already JPEG, which avoids a second decode if the compressed file is used.
Order of operations: crop, compress, convert, then merge only if other PDFs must join the pack. Cropping on the phone removes table edges and ceiling fans that cost bytes. Compression then has less work. Conversion then has less to embed. Merge last, because merge copies whatever PDF it is given.
Do not compress a PDF as if it were a photo on this page. The image compressor does not read PDF files. For a PDF that is already assembled, the size problem is inside its images. Going back to the photos is more controllable than hoping a later PDF rewrite guesses the right DPI.
Form upload size caps for compressed images
Form caps for compressed images cluster around 50 KB, 100 KB, 200 KB, and 500 KB. Enter the cap in KB. Then inspect faces and type. A hit on the byte cap with an unreadable photo is still a failed upload in practice.
Passport-style photos are the 50 KB class. They are small in pixels to begin with. A 2000-pixel-wide original will be scaled down during the target search. That is expected. Check that the face is not posterized.
Many Indian university and recruitment forms sit at 100 KB or 200 KB for a photograph or signature. Signatures on white paper compress well. Signatures on lined paper waste bytes on the lines. Recapture on blank paper if the cap is tight.
Product photos and blog images can live at 500 KB or even 1 MB and still be responsible. The web.dev image guide treats transfer size as a performance budget, not a portal rule. Use the portal number when there is a portal. Use a performance budget when the image is for a site.
| Cap | Typical use | What to watch in the preview |
|---|---|---|
| 50 KB | Passport / ID photo | Face edges, no heavy posterization |
| 100 KB | Many government forms | Face plus clothing detail |
| 200 KB | College and job portals | Type on documents still sharp |
| 500 KB | Product and blog photos | Noise and sky banding |
Target size search when compress images
Target size search, when compress images on Toolioz, is a loop over scale and JPEG quality. If the target is under 10% of the original bytes, scale starts at 50%. If the target is under 2% of the original bytes, scale starts at 30%.
At each scale, eight binary-search steps move quality between 0.05 and 0.95. When a blob fits, the search stops and that blob is kept. When a scale cannot fit, scale drops by 0.1 and the quality search runs again, down to 10% scale.
This is not a guarantee. A 12 MP photo of foliage can refuse to fall under 50 KB without becoming a smear. The algorithm then saves the fallback encode. Read the output size. If it is still over the cap, crop or recapture. Lowering quality on an already tiny, noisy image does not invent a new codec.
Quality-only mode, with an empty target field, keeps scale at 100% and uses the slider. That is the right mode when the goal is a lighter blog image and there is no hard cap. Default 0.8 is a reasonable first setting for photographs. Screenshots of text should stay higher, or stay PNG outside this tool.
- Empty target: quality slider, full resolution, one encode.
- Target set: search scale and quality, then maybe a harsh fallback.
- Original dimensions are shown so a surprise downscale is visible.
- Settings persist in localStorage on that browser, not on a server.
How to inspect compressed images before upload
Inspect compressed images at 100% zoom on a large display, then on the kind of device the reviewer will use. A laptop preview can hide damage that a phone upload form will show.
Look at high-contrast edges: glasses, collars, table lines, printed digits. JPEG ringing shows up there first. Look at flat walls and skies for banding. Look at small type until every character is unambiguous. If a 6 and an 8 collide, the file is too far gone for a marksheet.
Color shift can appear because canvas JPEG uses the browser's encoder, not the camera's original quantization tables. Skin that turns waxy is a sign to raise quality. A slight change in saturation is common and usually acceptable for a form photo.
Keep the original. The compressed JPEG is a derived file for a specific cap. Next year's portal may allow 300 KB. Re-deriving from the original beats trying to enlarge a 50 KB mush.
- View original and compressed side by side at 100% zoom.
- Read every digit on a document photo.
- Check hair, glasses, and collar edges on a portrait.
- Read the output size in KB against the form cap.
- Store original and compressed in different filenames.
Common compress images mistakes
Common compress images mistakes are treating JPEG as lossless, compressing twice, sending a transparent PNG through a JPEG encoder, and chasing a 20 KB cap on a busy 12 MP photo.
Screenshot-to-JPEG is the mistake that makes UI text look dirty. If the portal allows PNG, keep PNG. If it does not, use high quality and avoid extra downscale.
HEIC from iPhones is not in the supported list. Convert HEIC to JPEG on the phone or in an OS tool, then compress if the file is still heavy. Dropping a HEIC on this page will not produce a magical JPEG.
Using compress images as a PDF compressor is the last mistake. This page writes a JPEG. It does not rewrite PDF streams. For PDF packs, compress the photos first or go back to the sources, as described in the merge PDF files guide.
- Do not re-encode the download.
- Do not expect PNG alpha to survive.
- Do not feed PDF, SVG, or HEIC into this compressor.
- Do not trust a thumbnail. Zoom to 100%.
- Do not delete the original after a successful upload.
When not to compress images
Do not compress images that already fit the cap and look clean. Extra encodes only spend quality. Do not compress images that must stay lossless, such as archival scans stored as PNG or TIFF, unless a copy is being made for a form.
Print shops that ask for 300 DPI JPEGs at high quality are asking for data, not for a 80 KB file. A web compressor is the wrong tool for a magazine cover. Use the shop's spec.
Medical and legal archives should keep originals. A compressed JPEG for email is a convenience copy. Label it as such.
When the task is removing a backdrop, use the background remover instead. That page writes a transparent PNG and is a different pipeline. Compressing first would bake in JPEG blocks that make cutout edges worse.
Open Image Compressor
Runs in this browser tab. Files stay on the device.
Frequently Asked Questions
Does the Toolioz tool compress images without uploading the file?
Yes. Compression uses a canvas in the browser. The image is not uploaded for processing. Closing the tab discards the working file.
Can compress images keep PNG transparency?
No. Output is JPEG from canvas.toBlob. JPEG has no alpha channel. Logos that need a transparent background should stay PNG in a graphics workflow.
What does a target size do when compress images?
A target in KB searches over scale and JPEG quality. If the target is far below the original size, scale can start at 50% or 30%. If nothing fits, the saved JPEG uses quality 0.05 and 10% scale, which can still be larger than the target.
Is the saved file lossless after compress images?
No. The output is a JPEG. A preview is shown before download so the loss is visible. Run the pass once from the original file.
Which formats can compress images read?
JPEG, PNG, and WebP. The saved file is JPEG. SVG, HEIC, GIF, and PDF are not handled on this page.
Should compress images run before building a PDF of photos?
Yes, when a size cap exists. Image to PDF stores the image bytes. Compress readable JPEGs first, then convert. Do not treat merge PDF as a photo compressor.
Why can compress images miss a 20 KB cap?
Some photos cannot reach an extreme cap at any remaining quality and scale the tool tries. The fallback is quality 0.05 at 10% scale. Crop, recapture, or accept a higher cap.
What quality should compress images use for photographs?
Start at 0.8 with no target when there is no hard cap. For a named cap, enter the KB figure and judge the preview. Screenshots of small type need a higher quality or should stay PNG.