Metric | Value | Copy |
---|---|---|
{{ r.label }} | {{ r.value }} | |
Add an image to see details. |
# | Name | Original KB | Compressed KB | Save % | WxH → WxH | Copy |
---|---|---|---|---|---|---|
{{ idx+1 }} | {{ it.name }} {{ it.name }} | {{ it.sizeKB }} | {{ it.compSizeKB || '' }} | {{ it.savingPercent || '' }} | {{ (it.width||'—') }} × {{ (it.height||'—') }} → {{ (it.compWidth||'—') }} × {{ (it.compHeight||'—') }} | |
Batch is empty. Add images or drag‑and‑drop while Batch mode is on. |
Digital images are pixel based pictures that can grow large in storage and feel slow to send or publish. Compression reduces file size while keeping familiar detail that looks right for everyday viewing. Many projects benefit from image compression with target file size so results fit limits without guesswork.
You provide a photo, choose how small you want it, and optionally resize it so the longest side or a maximum width and height are respected. A simple compare view shows the original beside the compressed version so you can judge clarity before saving.
Pick a quality level if you want a quick result, or set a size in kilobytes when you must meet an attachment or upload cap. A balanced preset helps when you are unsure, and you can adjust in small steps until the tradeoff feels right.
Results vary with image content, so smooth skies and flat colors usually shrink more than fine textures and grain. Keep your original file so you can retry different settings later without cumulative loss.
The core quantity is file size in kilobytes and the visual footprint in pixels. The compressor re‑encodes the image with a quality factor and can scale dimensions by fit, percentage, or by setting the long edge in pixels. Exchangeable Image File Format (EXIF) metadata can be retained or removed, and camera orientation tags can be honored to prevent sideways previews.
The computation transforms the original image into a new encoded form using a quality ratio Q between 0.1 and 1.0. When a size target is set for compatible formats, the engine iteratively adjusts Q to approach the requested kilobytes. If resizing is enabled, new dimensions are calculated first, then encoding is performed on the resized bitmap.
Results are interpreted by comparing compressed size, dimensions, and visual inspection in the preview. Lower Q yields smaller files and fewer fine details; resizing reduces pixels and often dominates savings. Lossless outputs ignore the quality control and preserve exact pixel values, while lossy outputs trade some detail for smaller size.
Comparability improves when you keep lighting, subject texture, and dimensions similar across runs. The target size search accepts any outcome within a tolerance of the larger of 8 KB or 4% of the target, which prevents oscillation on difficult images.
Symbol | Meaning | Unit/Datatype | Source |
---|---|---|---|
Q | Quality ratio used during encoding | 0.1–1.0 | Input (from slider) |
Q% | Displayed quality percentage | 1–100 % | Input |
W, H | Image width and height | px | Derived (natural size or resized) |
L | Long edge setting | px | Input |
T | Target file size | KB (1024 bytes) | Input |
Sorig | Original file size | KB (2 decimals) | Derived |
Scomp | Compressed file size | KB (2 decimals) | Derived |
fmt | Output format family | "jpeg" | "webp" | "png" | Input |
Field | Type | Min | Max | Step/Pattern | Error Text | Placeholder |
---|---|---|---|---|---|---|
Image | File | — | — | accept: image/* | — | — |
Quality (%) | Range | 1 | 100 | step 1 | — | — |
Output format | Enum | — | — | webp | jpeg | png | — | — |
Target size (KB) | Number | 0 | — | step 1 | — | — |
Convert threshold (KB) | Number | 0 | — | step 1 | — | — |
Keep EXIF | Boolean | — | — | toggle | — | — |
Fix orientation | Boolean | — | — | toggle | — | — |
Resize mode | Enum | — | — | none | fit | scale | long | — | — |
Max width (px) | Number | 0 | — | step 1 | — | — |
Max height (px) | Number | 0 | — | step 1 | — | — |
Scale (%) | Number | 1 | — | step 1 | — | — |
Long edge (px) | Number | 1 | — | step 1 | — | — |
Batch mode | Boolean | — | — | toggle or ?batch=1 | — | — |
Input | Accepted Families | Output | Encoding/Precision | Rounding |
---|---|---|---|---|
Image file | image/* | JPEG, WebP, PNG | Lossy for JPEG/WebP; PNG lossless | Sizes to 0.01 KB; saving to 0.1% |
Numbers use a dot as the decimal separator. Displayed sizes round to two decimals; saving percentage rounds to one decimal.
Encoding is proportional to the number of pixels. Target size search performs at most seven passes per image. Batch processing is sequential to conserve memory.
Compression and conversion run in your browser; image data is not transmitted to a server. Keeping EXIF may include camera and GPS details; remove it for better privacy.
Common image families include the JPEG standard for lossy compression, the PNG specification for lossless compression with transparency, and WebP as a modern alternative that supports both modes.
All processing is browser‑based and deterministic for the same inputs and settings.
Image compression and resizing with a clear preview and a size target.
Example: Set target 400 KB, format WebP, fit to 1920 × 1280; adjust until the preview looks clean.
You now have a smaller image ready for faster sharing.
No. Processing happens locally in your browser and images are not uploaded. You control whether EXIF stays embedded.
Remove EXIF to minimize personal data.Results are accepted when within the larger of 8 KB or 4% of your target. This prevents endless retries on difficult content.
Targets apply to JPEG and WebP.File size is shown in kilobytes where 1 KB equals 1024 bytes. Numbers display with a dot as the decimal separator.
Yes. Enable “Keep EXIF” to retain camera and GPS records. Turning it off reduces size and improves privacy.
Enter 200 in Target size (KB), choose JPEG or WebP, and adjust quality if needed until the preview meets your standard.
Once loaded, compression runs locally. No image data is sent to a server during encoding or resizing.
There is no payment step in this app. Distribution and licensing follow the host site’s policy.
It is within the tolerance band around your target, so it is considered acceptable for size‑constrained uses.