How to extract text from an image
- Upload an image or PDF. A photo of a document, a screenshot, or a scanned PDF. PNG, JPG, WebP, BMP, and PDF are supported.
- Click Extract text. The first time, your browser downloads the recognition engine (about 7 MB) from keptlocal; after that it's cached. Each PDF page is read in turn, with progress shown as it goes.
- Copy or download the text. The result appears in an editable box. Fix anything misread, then copy it or save it as a .txt file.
Recognition happens on your own device. The image or PDF is never uploaded, so it's safe to use on documents you wouldn't hand to a stranger: IDs, bank letters, medical paperwork.
When to use OCR
- Scanned documents. A scanner or phone app often produces a PDF that's just pictures of pages. OCR turns them into text you can search, copy, and edit.
- Screenshots. Grab the text from an error message, a slide, a chat, or a page that won't let you select it.
- Photos of printed text. Receipts, letters, book pages, whiteboards with typed or neatly printed text, and signs.
- Getting text into another tool. Paste the result into a translator, a document, a spreadsheet, or a search box.
- Before redacting a scan. OCR the scan to find where names and numbers appear, then black them out with Redact PDF.
How it works under the hood
The text recognition is done by Tesseract, the open-source OCR engine originally developed at HP and later maintained by Google, compiled to WebAssembly by the tesseract.js project so it runs at near-native speed inside the browser. It uses an LSTM neural network trained on printed text: the image is split into lines, and each line is read as a sequence rather than letter by letter. That's why it copes well with ordinary fonts and spacing.
For a PDF, each page is first drawn to an image with pdf.js at about 180 DPI, a resolution that gives good accuracy without using too much memory, and then passed to Tesseract. The engine and the English model are served from keptlocal itself rather than a third-party CDN, and your browser keeps them, so later runs start quickly and work offline.
Getting the best results
- Use the sharpest image you have. Text should be at least 10–12 pixels tall. A full-resolution phone photo beats a compressed thumbnail.
- Keep it straight and evenly lit. Photograph pages flat, from directly above, without shadows or glare across the text.
- Crop to the text. Busy backgrounds, logos, and photos around the text can produce stray characters. Crop Image helps.
- Prefer high-contrast originals. Dark text on a plain light background reads best. Faded or colored text can benefit from converting the image to grayscale first.
Limits and what to expect
- English only for now. Other Latin-script languages are often partly recognized, but accented characters may be misread.
- Handwriting is unreliable. Neat block capitals may work; cursive mostly won't.
- Layout isn't preserved. You get the text in reading order, not the original columns, tables, or formatting.
- PDFs with real text don't need OCR. If you can already select text in the PDF, PDF to Text extracts it exactly and much faster.
- Long PDFs take time. Each page takes a few seconds on a typical laptop, longer on phones. Split very long documents with Split PDF to read only the pages you need.
Why OCR in your browser
Most free OCR sites upload your image to their servers to process it. For a screenshot of a meme that doesn't matter. For a scanned passport, a payslip, or a medical letter, it means a copy of that document now sits on someone else's server. Running the engine on your own device removes that copy from the equation entirely, at the cost of a one-time download of the engine.