How nanogb works (and how to check it)
The short version
When you choose a file, your browser reads it from your disk. Our code, which your browser downloaded with the page, turns it into a smaller file and hands it back to you as a download. The file never travels over the internet, so we never have it, cannot read it and cannot lose it.
The technology
- Video and audio: WebCodecs, the browser's interface to your device's video and audio encoders, driven by the open-source Mediabunny library (MPL-2.0).
- PDF: pdf-lib (MIT licence) for the lossless repack and pdf.js (Apache-2.0, the PDF viewer built into Firefox) to draw pages when they have to become images.
- Receipt fingerprint: the Web Crypto API calculates a SHA-256 hash of the result on your device.
- Works offline: once a page has loaded, a service worker keeps the app available without a connection.
Three ways to check that nothing is uploaded
- Go offline. Load nanogb, then switch on airplane mode or unplug the network and compress a file. It still works, because nothing needs to be sent anywhere.
- Watch the network. Open your browser's developer tools (F12 or Cmd+Option+I), choose the Network tab, then compress a file. You will see no request carrying your file. The receipt also lists every request the page made while it worked, which should be none.
- Read the rules we set ourselves. Every nanogb page is sent with a Content Security Policy header that only allows connections back to nanogb.com (
connect-src 'self'), and our server refuses every request except plain page downloads: there is no upload endpoint to send a file to. You can see the header in the Network tab under Response Headers.
What we do not claim
- Your browser and operating system are outside our control. Extensions you have installed can read pages you visit; use a clean browser profile for very sensitive files.
- The "Report a problem" form, if you choose to use it, sends what you type in it (not your file) to our support system.
- Our hosting provider, Cloudflare, sees the usual technical data of a page request, such as your IP address, to deliver the page. See the privacy policy.
Independent test
Before each release, an automated test opens nanogb in Chrome, Safari's engine (WebKit) and Firefox, compresses a real PDF, video and audio file, and records every network request. The release only goes out if no request leaves nanogb.com and no request has a body.