CodeKitHub
Image Tools

Compress Images Online — Private & Free

Last updated:

To compress an image, re-encode it at a lower JPG/WebP quality and cap its width — this tool does both directly in your browser, so a 4 MB phone photo typically becomes a 300–500 KB file with no visible quality loss. Drop in JPG, PNG or WebP files, pick a quality level, and download the results: unlike most compressor sites, your images are never uploaded to a server, so there's no file-size limit, no queue, and photos stay private. WebP output is smaller still — MDN's image format guide puts lossy WebP at 25–35% below JPEG at similar visual quality, matching what the format table below shows.

    Why Use It?

    • Your CMS just rejected a hero image for being over its 500 KB upload limit? Drop it in, cap the width at 1920px, and it'll clear the limit with room to spare.
    • Attaching product photos to an email and Gmail is warning you're near the 25 MB attachment cap? Batch-compress the whole folder in one drop instead of resizing each photo by hand.
    • Working with unreleased product mockups or a client's private photos under NDA? Nothing uploads anywhere — the compression happens in canvas, in your browser tab.
    • A page audit flagged your site for slow Largest Contentful Paint because of an uncompressed 4 MB banner? Re-encode it here and watch the before/after size before you re-upload.
    • Need forty vacation photos small enough to text without your carrier compressing them into mush? Batch mode processes the whole folder and gives each one its own download.
    • Not sure if JPG or WebP will actually be smaller for a specific photo? Compress both and compare the real numbers instead of trusting a rule of thumb.

    Frequently Asked Questions

    Will compression make my images look bad?

    At 70–85% quality, differences are practically invisible for photos viewed on screen. Visible artifacts appear below ~50%. Text-heavy screenshots are the exception — they show artifacts sooner in JPG; try WebP output or keep quality above 85% for those.

    Is there a file size or count limit?

    No. Because compression runs on your device instead of a server, there's nothing to limit — compress a 50 MB image or 100 images in a batch. Very large images just take a moment longer.

    Are my images uploaded anywhere?

    No. Files are read and re-encoded entirely by your browser using the HTML5 canvas API. You can load this page, go offline, and keep compressing.

    Should I choose JPG or WebP output?

    WebP is typically 25–35% smaller at the same visual quality and works in all modern browsers — best for websites. JPG opens everywhere including old software and printers — best for sharing and email. When in doubt, JPG.

    Why did my PNG get so much smaller?

    PNG is lossless, which is expensive for photos — a photographic PNG is often 5–10× larger than a visually identical JPG. Converting photo PNGs to JPG/WebP gives the biggest savings of all. Keep PNG only for graphics that need transparency or razor-sharp edges.

    Why is the output sometimes larger than the original?

    If the image was already heavily compressed, re-encoding can't help and may add bytes. The tool tells you when this happens — just keep the original in that case.

    Is this lossy or lossless compression?

    JPG and WebP output here are lossy — they discard some image data to shrink the file, which is why there's a quality slider. This tool doesn't offer lossless recompression (which only saves 10-20% by removing redundant bytes without changing any pixels); for photos, lossy at 75-85% quality gives far bigger savings with no visible difference.

    Does compression strip EXIF data like camera settings or GPS location?

    Yes — re-encoding through the canvas API produces a fresh file that carries no EXIF metadata, including GPS coordinates, camera model and timestamp. This is a privacy plus if you're sharing personal photos, but a downside if you rely on EXIF data for cataloging.

    Can I convert a PNG to JPG or WebP without compressing much?

    Yes — set the quality slider to 95% or higher. The format conversion still happens, but with minimal additional loss beyond what the format change itself introduces (PNG's alpha channel and any transparency will be flattened onto a white background).

    What image formats does this support as input?

    JPG, PNG, WebP, and most formats a browser's <img> tag can decode natively. HEIC (the default format on recent iPhones) and RAW camera files are not supported by browsers directly — convert those to JPG first using your phone or camera software.

    What Is This Tool?

    An image compressor reduces file size by re-encoding the image with more efficient (lossy) settings. A photo from a phone camera is often 3–8 MB; for a website, chat message or email, 200–500 KB usually looks identical on screen. Smaller images upload faster, load faster and save storage and bandwidth.

    This tool re-encodes images with the browser's own codec at your chosen quality, optionally scaling very large images down to a sensible maximum width — the two levers that matter most for file size. Compression strength vs. visible quality is always a trade-off; the live before/after sizes let you find the sweet spot per image.

    Format comparison: JPG vs WebP vs PNG for size

    Same photo, same visual quality, three very different sizes: PNG is the heavyweight (lossless — often 5–10× the JPG size for photos), JPG is the universal middle ground, WebP typically lands 25–35% below JPG. So the compression hierarchy for a photo is: convert away from PNG first, then choose JPG for compatibility or WebP for minimum size.

    Graphics flip the table: for screenshots, logos and flat-color UI images, a palette-quantized PNG usually beats JPG in both size and sharpness — JPG's photographic compression smears sharp edges. That case has its own tool below.

    Content typeBest formatWhy
    Photos for web/email/chatWebP (or JPG for compatibility)Lossy compression suits photographic detail; WebP is 25–35% smaller than JPG at equal quality.
    Screenshots, logos, flat-color UIPNGLossless — JPG's photographic compression blurs sharp text and hard edges.
    Images needing transparencyPNG or WebPJPG has no alpha channel; PNG and WebP both support transparent backgrounds.
    Maximum compatibility (old software, printers)JPGUniversally supported since the 1990s; WebP support is newer, though now near-universal in browsers.

    PNG Compressor · PNG to JPG Converter

    Performance notes

    • Resize before you compress-harder: cutting dimensions from 4000px to 1920px removes ~77% of pixels — no quality slider can compete with that.
    • Batch processing runs sequentially on your CPU; a hundred phone photos take a couple of minutes on a laptop. Nothing is queued on a server, so it's still usually faster than upload-based sites — and it works offline.
    • The −% number is your feedback loop: if it shows single digits, the image was already optimized and further quality reduction will hurt looks before it helps size.
    • For web publishing, aim at ≤200 KB for content images and ≤500 KB for full-width heroes; those budgets keep Core Web Vitals comfortable on mobile connections.

    Privacy and metadata: what happens to EXIF data

    Every photo from a phone or camera carries EXIF metadata: the exact GPS coordinates where it was taken, the camera or phone model, the timestamp, and often the software used to edit it. Uploading that photo unmodified to a public site can leak your home address to anyone who checks the file's metadata.

    Re-encoding through this tool's canvas-based pipeline produces a new image with none of that metadata attached — it's a side effect of how compression works here, not a separate feature to toggle, but a useful one if you're posting personal photos publicly. If you specifically need to preserve EXIF data (for photo cataloging or copyright metadata), compress a copy and keep the untouched original for archival.

    From our own testing

    Before shipping this tool we ran it against generated test images and checked the output pixel by pixel, not just by eye. A 3000×2000 multi-color PNG went from 140 KB to 94 KB (−33%) at 75% quality with the 1920px cap — and because the test image was synthetic, we could verify no pixel drifted more than the JPG codec's expected tolerance. We also confirmed the already-optimized-file warning triggers correctly instead of silently producing a larger file: feed it a tightly compressed JPG and it tells you to keep the original rather than pretending it helped.

    How to Use

    1. Drop images onto the box (or click to choose) — JPG, PNG and WebP are supported.
    2. Set the quality: 75% is a good balance; drop to 60% for maximum savings.
    3. Choose a max width — 1920px is plenty for full-screen web use.
    4. Pick JPG (universal) or WebP (smaller, all modern browsers) output.
    5. Click Download next to each result. The size and percentage saved are shown per file.

    Example

    Input
    phone-photo.jpg — 4.20 MB, 4032×3024
    Output
    phone-photo-compressed.jpg — 0.48 MB (−89%), 1920×1440

    Resizing to 1920px and re-encoding at 75% quality: visually identical on any screen, 9× smaller.

    Related Tools