Buy me a coffee

Collection13 tools

PDF tools

Merge, split, rotate, stamp and extract — with a straight account of what compression and Word conversion really cost.

PDF is a page-description format, not a document format, and almost every frustration people have with PDF tools comes from that one fact. A PDF says where marks go on a page. It does not necessarily know that a run of marks is a paragraph, that a grid of lines is a table, or that any of it is text at all. Some PDFs carry a text layer alongside the marks; scans carry only an image. Editing a PDF is therefore nothing like editing a document — it is closer to editing a printout.

That shapes what a browser can and cannot do well. Operations on the page structure — reordering, extracting, rotating, merging, stamping something on top — are cheap and lossless, because they manipulate objects the format already models explicitly. Operations that require understanding the content — reflowing text, converting to Word, shrinking a file without visibly degrading it — are hard everywhere, and the browser is not where they are easiest.

The tools here are honest about which side of that line each operation falls on. The structural ones use pdf-lib to write files and pdf.js to read them, both running in your tab with a self-hosted worker; the interpretive ones tell you up front what they will lose.

The lossless half: page surgery

Merge PDF copies page objects from several documents into one. Split PDF does the reverse, by explicit ranges or into single pages, zipping the result when there is more than one output file. Reorder PDF Pages rebuilds the document in an order you specify — and because it rebuilds from the order you give, a page you leave out of the order is a page you have deleted, which is a useful shortcut once you know it and a surprise if you do not.

Rotate PDF sets each page's rotation entry rather than re-rendering anything. It is absolute rather than additive: setting 90° on a page already at 90° leaves it at 90°, not 180°. That is a deliberate choice — it makes the operation idempotent and means you can fix a mixed-orientation scan by setting the same value repeatedly without counting.

JPG to PDF goes the other direction, building a document from JPEG and PNG images with a chosen page size or a page fitted to each image, plus orientation and margin. Images are scaled to fit and never upscaled, which is why a small image lands centred at its natural size rather than blown up and soft. And PDF Tools is the workbench that contains all of these as tabs, for when you have three things to do to the same file and do not want to download and re-upload between each one.

Compression, and what it really costs

Compress PDF deserves a paragraph of its own, because the word 'compress' hides very different mechanisms across different tools and the difference matters.

This one rasterises. Every page is rendered to a canvas at a preset scale, encoded as a JPEG, and embedded into a new document at the original page dimensions. Three presets trade quality against size. The geometry is preserved exactly, and the result is usually much smaller for a scan-heavy or image-heavy file.

What you lose is everything that was not a picture. Text stops being text: it is no longer selectable, searchable, or readable by a screen reader. Links stop working. Bookmarks, form fields, annotations and metadata are gone. And for a document that was mostly text to begin with, a page of rendered pixels can easily be *larger* than the vector page it replaced, so the file can grow.

This is the right tool for a 40MB folder of phone photos saved as a PDF, and the wrong tool for a text-heavy report you will need to search later. If you want to keep the text layer, the usual answer is to reduce the source images before the PDF is built — the image compression tool does that with a target file size — rather than to compress the PDF afterwards.

Getting the text back out

Extract Text from PDF reads the text layer through pdf.js and returns it page by page. When a PDF was produced by software — exported from a word processor, generated by a reporting system — the text layer is there and extraction is quick and accurate. Reading order is whatever pdf.js emits, so a heavily multi-column layout can interleave oddly; it is a dump, not a reconstruction.

When there is no text layer at all — a scan, a photographed page, a fax — extraction returns nothing, and the tool says so and points you at OCR. That is Image to Text, which runs Tesseract compiled to WebAssembly, accepts PDF input directly, renders each page and recognises it in five languages including Arabic. There is optional deskew and binarisation preprocessing, which matters more than people expect on photographs of paper.

Set expectations correctly here: this is a good open-source OCR engine running on your laptop's CPU. It is not a cloud document-understanding service with a large vision model behind it. On a clean 300-DPI scan of printed text it does well. On a crumpled receipt, a low-contrast photo, handwriting, or a dense table, a server-side service with a modern vision model will beat it, and it is not close. The trade you are making is accuracy for the document never leaving your machine — which for some documents is exactly the right trade and for others is not.

PDF, Word, and the honest account of conversion

PDF to Word does something more ambitious than it sounds and less than the name promises. It is a geometry-driven reconstruction: it reads text positions through pdf.js, works out reading order and columns, detects drawn rules to find tables, then classifies blocks into headings, paragraphs, ordered and unordered lists and tables based on font size, indentation, list-marker patterns and vertical gaps. It de-hyphenates words broken across line endings. The output is a real .docx built with the docx library.

So you get a re-flowed semantic document — not a pixel-faithful copy of the original layout. Images are not carried across at all. Character styling such as bold, italic, colour and font is not extracted. Merged and multi-line table cells are not supported, and two separate tables on one page may be read as one. Pages that are essentially scans are detected, listed, and skipped, with a pointer to the OCR tool. If what you need is 'the text and structure, editable', this does that. If you need the document to look the same, no browser tool will give you that and most server tools will not either.

Word to PDF takes the opposite route and is unusual enough to explain. It reads a .docx with mammoth, converts it to clean semantic HTML, sanitises it, renders it in the page, and then hands off to your browser's own print-to-PDF. There is no PDF writer involved — you choose 'Save as PDF' in the print dialog. The upside is that the text stays selectable and searchable and the typography is the browser's, which is good. The cost is that the result is a normalised rendering rather than a replica: complex layouts, floats, multi-column sections, and headers and footers do not survive. Input is .docx only; the older .doc format is not supported.

Related collections

Building PDFs from photographs, or shrinking the images before they go in, is covered by the image tools collection. The reasons you might specifically want document work to stay on your own machine are set out in the privacy-first collection.

Thirteen operations

Structural operations first, then the interpretive ones where fidelity is a real question.

Where a browser is the wrong place to do this

Cryptographic signing. Sign PDF places a picture of a signature on a page. There is no certificate, no PKCS#7 or CAdES signature object, no hashing of the document and no tamper detection. It is the digital equivalent of signing a printout — appropriate for a great many everyday agreements, and not appropriate where a legally recognised digital signature is specifically required. If someone has asked for a qualified electronic signature, use a service that issues one.

Serious OCR. As above: Tesseract in WebAssembly on your CPU is capable, and a modern cloud vision model on difficult inputs is better. Handwriting, complex tables and poor-quality photographs are where the gap is widest.

Layout-faithful conversion. Neither PDF to Word nor Word to PDF preserves layout, and both say so on their own pages. This is not a browser limitation you can engineer around; it is the format gap described at the top.

Very large files. Everything runs in your tab's memory. A several-hundred-megabyte PDF, or rasterising a two-hundred-page document, will be slow and can exhaust the tab. That is the real ceiling on client-side document work, and it is worth knowing before you start rather than at 80%.

Related collections