Edit PDF Text Directly In Your Browser
This tool makes real in-place edits to PDF content streams — the same technique used by desktop PDF editors, running entirely on your device via WebAssembly.
How In-Place PDF Text Editing Works
A PDF page's visual content is described by a
content stream — a sequence of operators like
BT (begin text),
Tf (set font),
Tm (set text matrix/position),
Tj (show string), and
ET (end text). When you click a span, this tool:
- Reads the raw content stream bytes from the page's PDF object
- Tokenizes the stream to find every string operand — both
(literal) and <hex> forms
- Matches the clicked span's text to the correct operand
- Splices in your replacement bytes at the exact same offset, using hex encoding for reliable round-trips
- Writes the modified stream back via
writeStream() and re-renders the page
The surrounding operators — font, position, color, size — are completely untouched. Only the string bytes change.
What PDFs work best
| PDF type | Editable? | Notes |
|---|
| Invoices, receipts, contracts | ✅ Yes | Standard Latin fonts, ASCII content |
| Forms and certificates | ✅ Usually | Depends on encoding |
| Scanned documents | ❌ No | No real text layer — image only |
| CID/CJK font PDFs | ⚠️ Partial | Multi-byte glyph codes may not match |
| Password-protected PDFs | ❌ No | Must remove password first |
Privacy model
Most online PDF editors upload your file to a server, process it there, and return a result. This tool is different: the
mupdf.js WebAssembly module (~6 MB, cached after first load) runs entirely inside your browser tab. The PDF bytes are passed directly to the WASM module — no network request is made for the actual editing or rendering. The only outbound request is the one-time download of the WASM binary itself.
Related Tools
- Need to add text on top without editing the stream? Use E-Sign PDF to overlay annotations.
- Merge multiple PDFs after editing using Merge PDF.
- Extract text from a scanned PDF using Text Extractor (OCR).