How I Built a Browser-Based File Compression Tool for India Using Canvas API and pdf-lib — No Backend Needed

Published: (June 8, 2026 at 02:21 AM EDT)
1 min read
Source: Dev.to

Source: Dev.to

I built ResizeKB — a free image and PDF resizer built specifically for Indian users. 25+ tools. Zero server uploads. Pure HTML, CSS, JavaScript. Here’s how and why. The Problem The Tech Stack Canvas API for image processing Total infrastructure cost: ₹1,162 per year for the domain. Everything else free. Image Compression — The Binary Search Algorithm const img = await loadImage(file); while (high - low > 0.01) { PDF Compression — How It Works async function compressPDF(file, targetKB) { // Calculate target KB per page // Rasterize each page to canvas at calculated DPI const compressed = await pdfDoc.save(); Privacy — Why It Matters Browser Compatibility Considerations What I’d Do Differently Results — Week 1 212 pages discovered by Google within 24 hours of sitemap submission Try It resizekb.com — free, no account, no watermark, works on mobile. Source is private for now but happy to answer technical questions in the comments.

0 views
Back to Blog

Related posts

Read more »