Most people assume a website needs your file on its servers to change it. That was true for a long time, but modern browsers are powerful enough to do the work themselves. When a PDF tool is built this way, your file is read from your device by the page's code, changed in memory and saved back to your device. Nothing needs to travel anywhere.
This guide explains the pieces involved using DocPro as the example, because we can check its source. The same ideas apply to any on-device tool.
What happens when you choose a file
When you pick a file in a web page, the browser gives that page a handle to it. The page can read the bytes with standard browser features, but only for files you chose. The page's JavaScript then works on those bytes. If it never calls a network function with the contents, the file does not leave the device. The result is created as a new file in memory and offered as a download. The original is untouched.
JavaScript and WebAssembly
JavaScript runs in every browser and is fine for many tasks. Heavier work, such as OCR or encryption, needs more speed. WebAssembly (WASM) is a compact binary format that browsers run at close to native speed. Existing C and C++ programs can be compiled to WebAssembly, so a mature library can run unchanged inside a web page. Both run inside the browser's sandbox, which limits what code can touch on your device.
The libraries doing the work
DocPro's web app vendors its libraries, which means they are copied into the site and loaded from the same origin instead of a CDN. Its vendor notes list the versions and licences. The main ones are:
- pdf-lib (MIT): creates and edits PDFs in JavaScript. It handles jobs such as merging, splitting and reordering pages.
- pdf.js (Apache-2.0): Mozilla's PDF renderer. It draws pages for viewing and for tools that need page images, such as compression and PDF to images.
- qpdf compiled to WebAssembly (Apache-2.0): used for password protection and unlocking, with AES-256 encryption.
- tesseract.js (Apache-2.0): OCR compiled to WebAssembly, with language data bundled for English, Arabic, Persian, Urdu and Hindi.
- docx, SheetJS, pptxgenjs, mammoth and JSZip: read and write Word, Excel and PowerPoint files and zip archives for the conversion tools.
- MediaPipe (Apache-2.0): runs a small image segmentation model for the passport photo tool.
All of this is open source, which makes the approach auditable.
Working offline
Because the code runs on your device, the tools can work without a connection once the page and libraries are cached. DocPro is a progressive web app: it registers a service worker that stores the app shell and tool modules, and caches the larger libraries the first time a tool needs them. Then it can run offline, and you can install it from your browser. The catch is the word first. If you have never used OCR on this device, the OCR files have to be downloaded once. Open the tools you care about while you are online.
What on-device does and does not mean
Running locally means the document content is not sent to a server. It does not mean the website never talks to the internet. The page itself loads from a server. An account system, such as DocPro Pro sign-in, talks to an API to check a subscription. Analytics, if any, may send usage data. The question to ask is whether the file contents are sent. You can test it yourself with our guide on how to check whether a PDF website uploads your files.
A web page can also restrict itself. DocPro's Content Security Policy tells the browser to allow connections only to its own site and its account server, so a bug or a rogue script would have trouble sending a document elsewhere.
Limits you should know about
- Memory. A browser tab has less memory than a desktop app, and a phone has less than a laptop. DocPro's tools accept files up to about 300 MB, but large or image-heavy PDFs can be slow or fail on weak devices.
- Speed. OCR and compression are heavy. Time depends on your device: a long scan can take noticeably longer on a phone than on a laptop, and it helps to keep the screen on while it works.
- Fidelity. Some tools rebuild a document rather than editing it. PDF to Word reconstructs paragraphs from text, so complex layouts shift. Word to PDF in the browser uses a basic layout, not Word's own engine. Compress PDF re-saves pages as images, so text becomes unselectable.
- Fewer features than big suites. A browser tool set is smaller than a full editor. DocPro cannot edit existing text, redact, build forms or apply certificate-based signatures.
- Browser differences. Older browsers lack features such as certain WebAssembly extensions. DocPro uses the legacy build of pdf.js on purpose, to work on more browsers.
- Trust still matters. You are running code from a website. Open-source libraries and a strict security policy help, but you are still trusting the site's own code, which is why verification matters.
When on-device is the right choice
Use on-device tools for private documents, quick jobs, flights and poor connections, and any time you do not want an account. Use a server-based service or a desktop editor when you need heavy features, exceptional fidelity or very large files. See the roundup of free PDF tools for options in both groups.
For the privacy background, read why private documents deserve extra care.