A free, offline, privacy-first image compressor that runs entirely in your browser. Compress JPEG, PNG, and WebP images locally—no uploads, no server, no data leaves your device. Perfect for reducing file size for web, email, or storage while keeping your photos private.
Keywords: free image compressor, local image compressor, offline image compression, browser image compressor, compress images without uploading, private image optimizer, image size reducer, batch image compression, EXIF remover
- 100% local & offline — All compression happens in your browser; images never leave your machine
- Free & open source — No sign-up, no paywall, no limits
- Smart compression — SSIM-based quality targeting for optimal file size with minimal visible loss
- Multiple formats — Convert between JPEG, PNG, and WebP
- EXIF / metadata stripping — Remove GPS location, camera info, and other embedded data before download
- Batch processing — Compress multiple images at once and download as a single ZIP file
- Before/after comparison — Slider to compare original vs compressed side by side
- Dark mode — Easy on the eyes in low light
- Node.js (v18 or later recommended) — Download here if you don't have it
git clone https://github.com/YOUR_USERNAME/Image-Compressor.git
cd Image-CompressorIf you downloaded a ZIP file, extract it and open a terminal in that folder.
npm installnpm run devGo to http://localhost:3000 — the image compressor is now running on your machine.
To create a static build you can deploy or run without Node:
npm run buildThe built files will be in the dist folder. You can:
- Serve them with any static file server (e.g.
npx serve dist) - Deploy to GitHub Pages, Netlify, Vercel, or any static host
- Drag & drop images onto the drop zone, or click to browse
- Paste images from your clipboard (Ctrl+V / ⌘V)
- Adjust settings (quality, format, EXIF stripping) in the right panel
- Click Start Processing to compress
- Download individual images or save all as a ZIP file
- 100% local processing: images are never uploaded or sent over the network.
- All processing is done with client-side scripts; verify
browser-image-compressionandJSZipversions are up-to-date. - Disable clipboard paste handling if the page is loaded in an insecure context (non-HTTPS in production).
- Clear object URLs on every file removal and on unmount (avoids memory leaks and accidental caching).
- For browsers with strict cross-origin policies, use
safefallback for image decoding by verifyingcreateImageBitmapandCanvasavailability. - Use optional
stripExifsetting to remove metadata and location data; default is enabled. - Validate MIME types on input files to prevent unsupported / malformed content.
-
Add standard scripts for lint/test/release in
package.json:npm run lint— run ESLint with TypeScript rules.npm run test— run tests (add Jest/Playwright later).npm run format— run Prettier.npm run release— Bump version + build + tag.
-
Keep changelog and version in sync:
CHANGELOG.mdwithUnreleasedsection.- bump semver via
npm version [patch|minor|major]+git push --follow-tags.
-
CI checklist:
- Node 18+ environment
npm ciinstall dependencies- run
npm run lint && npm run build && npm run test
React, TypeScript, Vite, browser-image-compression, JSZip