Dev.to WebDev 🛠 Dev 👁 0 📖 2 min read

432 browser tools that never upload your files

Every PDF compressor I used wanted the file on their server. For a payslip or a passport scan that never sat right with me, so I built the alternative: 432 utilities that run entirely in the browser tab. No upload, no

Every PDF compressor I used wanted the file on their server. For a payslip or a passport scan that never sat right with me, so I built the

alternative: 432 utilities that run entirely in the browser tab. No upload, no account, no daily quota, no watermark.

Here is what is actually interesting about building it, because "client-side" hides a lot of work.

The PDF compressor takes a target size, not a quality slider

Every tool asks for a quality percentage. What people actually have is a limit: "this portal says 200 KB".

So the loop runs backwards. Each page is rendered once at 2× resolution and kept as a canvas. Then a binary search over JPEG quality finds the highest value whose output still fits under the limit — about six rebuilds. If even 32% quality at 42% scale is too large, the file genuinely cannot hold that much information, and the tool says so instead of shipping grey mush.

OCR that puts the words back

A scan is a picture of a page. To make Ctrl+F work you need an invisible text layer. Tesseract gives you a bounding box per word in image coordinates; multiply by pageWidthInPoints / renderedWidthInPixels and you can draw each word at zero opacity exactly over the pixels it describes. The page renders identically and becomes selectable.

Caveat worth knowing: the PDF standard's 14 built-in fonts cover Latin only. Urdu and Arabic need an embedded Unicode font, which adds megabytes — so those words go into a text box instead of the PDF layer.

ffmpeg in WebAssembly is 31 MB and worth it

Converting 16:9 to 9:16 with a blurred background is a filter graph:

[0:v]scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920,gblur=sigma=28[bg];
[0:v]scale=1080:1920:force_original_aspect_ratio=decrease[fg];
[bg][fg]overlay=(W-w)/2:(H-h)/2

The engine downloads once and stays cached. That is the whole trade: 31 MB instead of a subscription.

The CSP forced a real parser

The site ships script-src 'self' 'wasm-unsafe-eval' — no unsafe-eval. So the graphing calculator cannot use new Function(). It tokenises the expression, converts to RPN with a shunting-yard loop and evaluates on a stack. Safer anyway: nothing typed into that box can execute as code.

What I deliberately did not build

Backlink checkers, plagiarism detectors, site audits. All of them need somebody else's index. A tool that guesses is worse than no tool, so they are not there.

The backend

There isn't one. Static HTML on Cloudflare Pages, with pdf.js, pdf-lib and ffmpeg.wasm self-hosted. The only server-side piece is a page-view counter that skips bots and the owner.

Try it: https://toolcin.pages.dev — no sign-up.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.