Compress PNG, JPEG & WebP in your browser — nothing uploaded. Offline, MIT.
See the codeCompress, resize and convert PNG, JPEG and WebP images in your browser. Nothing is uploaded.
tinysquish.com · Benchmark · Bahasa Indonesia · MIT licensed
TinySquish is a free image compressor that runs entirely on your device. Images are decoded, compressed and saved by JavaScript in the browser, so they never leave your computer or phone, and the app keeps working offline after the first visit.
The same compressor for the terminal, scripts and AI agents. It runs on your machine: no upload, no API key, no server. Needs Node.js 20+.
npx -y tinysquish photo.jpg --max 100kb # fit an upload limit
npx -y tinysquish ./images -f webp -o ./web # a folder → WebP
npx -y tinysquish ./shots --json # machine-readable results
npm install -g tinysquish # install once, then use offline
Inputs are never modified; results are written as name-compressed.ext. See tinysquish --help.
MCP server (tools compress_images and image_info, local stdio, no network):
claude mcp add tinysquish -- npx -y -p tinysquish tinysquish-mcp
{ "mcpServers": { "tinysquish": { "command": "npx", "args": ["-y", "-p", "tinysquish", "tinysquish-mcp"] } } }
Add "--allow", "/path/to/folder" to the args to restrict which folders it may read and write.
Agent skill: skill/tinysquish/SKILL.md, for Claude Code save it as
~/.claude/skills/tinysquish/SKILL.md. More: tinysquish.com/cli.
The CLI follows the same rules as the web app (quality, lossless PNG from 90%, max size, never larger than the original) but encodes with libvips via sharp, so sizes are similar, not byte-identical.
| Format | Encoder |
|---|---|
| JPEG, WebP | The browser's own encoders through the Canvas API (canvas.toBlob) |
| PNG | UPNG.js color quantization + pako DEFLATE |
There is no build step: the site is static HTML, CSS and vanilla JavaScript.
app.js compressor UI and engine (injected into #app-root by loader.js)
loader.js loads pako → UPNG → app.js, registers the service worker
sw.js network-first service worker for offline use
style.css all styles
tools/
build-site.py generates every HTML page, sitemap.xml and llms.txt from one template
benchmark.js reproducible size/PSNR benchmark → bench/results.json
render-assets.js renders og-image.png, icons and favicon.ico
crawler-report.py search/AI crawler activity from the nginx log
cli/ npm package "tinysquish": core.js, run.js, bin/tinysquish(-mcp).js, tests
skill/ agent skill (SKILL.md)
server/visits.py tiny anonymous visit counter (stdlib + SQLite, no raw IPs stored)
deploy/ nginx config, systemd unit, deploy.sh
tests/ browser regression tests (Playwright) and SEO checks
python3 -m http.server 8000 # then open http://localhost:8000
Edit page content in tools/build-site.py, then regenerate:
python3 tools/build-site.py
NODE_PATH=~/node_modules node tests/browser-regressions.js # bug regressions (needs playwright + chromium)
NODE_PATH=~/node_modules node tests/features.js # every user-facing feature, incl. offline
python3 tests/seo-check.py # crawler view of every page
cd server && python3 -m unittest test_visits # visit counter
npm install && npm test # CLI + MCP (node:test)
Both browser and SEO checks also run against production: TINYSQUISH_URL=https://tinysquish.com/ …
and python3 tests/seo-check.py https://tinysquish.com/.
tools/benchmark.js drives the real app over the Kodak photo suite
and UI screenshots and records size and PSNR per image. Latest results:
tinysquish.com/benchmark (raw JSON).
NODE_PATH=~/node_modules node tools/benchmark.js /path/to/kodak
deploy/deploy.sh backs up the web root, copies the files, verifies that live matches the repo,
runs the SEO and browser tests against production and notifies IndexNow about changed pages.
deploy/deploy.sh --rollback <backup.tgz> restores a backup.
MIT © Nur Adli. Bundled third-party code and fonts keep their own licenses, see THIRD_PARTY_NOTICES.md.
Bug or idea? Open an issue.
Compress PNG, JPEG & WebP in your browser — nothing uploaded. Offline, MIT.
See the codeCompress, resize and convert PNG, JPEG and WebP images in your browser. Nothing is uploaded.
tinysquish.com · Benchmark · Bahasa Indonesia · MIT licensed
TinySquish is a free image compressor that runs entirely on your device. Images are decoded, compressed and saved by JavaScript in the browser, so they never leave your computer or phone, and the app keeps working offline after the first visit.
The same compressor for the terminal, scripts and AI agents. It runs on your machine: no upload, no API key, no server. Needs Node.js 20+.
npx -y tinysquish photo.jpg --max 100kb # fit an upload limit
npx -y tinysquish ./images -f webp -o ./web # a folder → WebP
npx -y tinysquish ./shots --json # machine-readable results
npm install -g tinysquish # install once, then use offline
Inputs are never modified; results are written as name-compressed.ext. See tinysquish --help.
MCP server (tools compress_images and image_info, local stdio, no network):
claude mcp add tinysquish -- npx -y -p tinysquish tinysquish-mcp
{ "mcpServers": { "tinysquish": { "command": "npx", "args": ["-y", "-p", "tinysquish", "tinysquish-mcp"] } } }
Add "--allow", "/path/to/folder" to the args to restrict which folders it may read and write.
Agent skill: skill/tinysquish/SKILL.md, for Claude Code save it as
~/.claude/skills/tinysquish/SKILL.md. More: tinysquish.com/cli.
The CLI follows the same rules as the web app (quality, lossless PNG from 90%, max size, never larger than the original) but encodes with libvips via sharp, so sizes are similar, not byte-identical.
| Format | Encoder |
|---|---|
| JPEG, WebP | The browser's own encoders through the Canvas API (canvas.toBlob) |
| PNG | UPNG.js color quantization + pako DEFLATE |
There is no build step: the site is static HTML, CSS and vanilla JavaScript.
app.js compressor UI and engine (injected into #app-root by loader.js)
loader.js loads pako → UPNG → app.js, registers the service worker
sw.js network-first service worker for offline use
style.css all styles
tools/
build-site.py generates every HTML page, sitemap.xml and llms.txt from one template
benchmark.js reproducible size/PSNR benchmark → bench/results.json
render-assets.js renders og-image.png, icons and favicon.ico
crawler-report.py search/AI crawler activity from the nginx log
cli/ npm package "tinysquish": core.js, run.js, bin/tinysquish(-mcp).js, tests
skill/ agent skill (SKILL.md)
server/visits.py tiny anonymous visit counter (stdlib + SQLite, no raw IPs stored)
deploy/ nginx config, systemd unit, deploy.sh
tests/ browser regression tests (Playwright) and SEO checks
python3 -m http.server 8000 # then open http://localhost:8000
Edit page content in tools/build-site.py, then regenerate:
python3 tools/build-site.py
NODE_PATH=~/node_modules node tests/browser-regressions.js # bug regressions (needs playwright + chromium)
NODE_PATH=~/node_modules node tests/features.js # every user-facing feature, incl. offline
python3 tests/seo-check.py # crawler view of every page
cd server && python3 -m unittest test_visits # visit counter
npm install && npm test # CLI + MCP (node:test)
Both browser and SEO checks also run against production: TINYSQUISH_URL=https://tinysquish.com/ …
and python3 tests/seo-check.py https://tinysquish.com/.
tools/benchmark.js drives the real app over the Kodak photo suite
and UI screenshots and records size and PSNR per image. Latest results:
tinysquish.com/benchmark (raw JSON).
NODE_PATH=~/node_modules node tools/benchmark.js /path/to/kodak
deploy/deploy.sh backs up the web root, copies the files, verifies that live matches the repo,
runs the SEO and browser tests against production and notifies IndexNow about changed pages.
deploy/deploy.sh --rollback <backup.tgz> restores a backup.
MIT © Nur Adli. Bundled third-party code and fonts keep their own licenses, see THIRD_PARTY_NOTICES.md.
Bug or idea? Open an issue.