Why Base64 is a third bigger, and why btoa breaks on accented textBase64 output is a third bigger than the input. Measured sizes, the btoa UTF-8 trap, URL-safe variants and file signatures, with Node output.4 min read·toolsyhub.hashnode.dev5h ago
Is this timestamp in seconds or milliseconds? Guessing the unit from the digit countGuess a Unix timestamp's unit from its digit count, keep nanoseconds exact with BigInt, floor negative values and respect the JavaScript Date range.3 min read·toolsyhub.hashnode.devNov 12
How to shrink a PDF to a target size in the browser: render pages, split a byte budget, retry three timesCourt portals, job sites and university forms often cap uploads at a number like 200 KB or 2 MB. Most PDF compressors give you a quality slider and leave you to guess. If you know the target, you can3 min read·toolsyhub.hashnode.devNov 5
How to compress an image to an exact KB limit in the browser (canvas, binary search, and when to stop lowering quality)Upload forms for visas, exams and job portals often say "photo must be under 100 KB". A phone photo is 3 to 5 MB, and the usual advice is to drag a quality slider until the number looks right. You can3 min read·toolsyhub.hashnode.devOct 29
Building PDF tools that never upload your file: pdf-lib, pdf.js and qpdf in WebAssemblyHow merge, split, compress and unlock PDF run fully in the browser with pdf-lib, pdf.js and qpdf compiled to WebAssembly, and where that falls short.4 min read·toolsyhub.hashnode.dev3AOct 22