Tutorials

Extract text from images and scans: the best methods in 2026

How to pull editable text out of screenshots, photos and scanned documents — the best OCR approaches compared, accuracy expectations, and a privacy-safe workflow.

Marek Novák · Engineering LeadJune 1, 2026 13 min read
Share Post LinkedIn
Extract text from images and scans: the best methods in 2026

Text hides in a lot of places where it cannot — yet — be searched or copied. A screenshot of a table. A photo of a whiteboard. A scan of a printed page. An image-only PDF from a low-quality export. In each case, the words are right there in front of you, and simultaneously impossible to select, copy, or search.

Text extraction — OCR applied to an image — is the tool that releases those words. It reads the pixels, reconstructs the characters, and hands you back editable, searchable text. This guide covers the best methods in 2026, how accurate you can expect them to be, and how to do extraction without sacrificing privacy.

The quick path: open the OCR to text tool, drop your image or scan, and copy out the recognised text. The rest of this guide makes you an expert at getting clean results and knowing when to trust them.

The two kinds of 'extract text from a file' problem

Before choosing a method, it helps to know which of two very different problems you are facing, because the right tool differs.

Digital text extraction

If your file already contains text — a plain PDF, an exported document, a vector PDF — the text is stored as real characters, just locked in the format. Extraction here is exact. The tool reads the character data directly and returns it perfectly, with no guesswork.

The PDF to Word and PDF to Excel tools work this way on documents that have a text layer, and our article on extracting data from PDF to Excel describes the detection in detail.

Optical character recognition

If your file is an image — a screenshot, photo, or scan — the text exists only as pixels. It must be optically recognised, which means inferring characters from visual patterns. This is inherently probabilistic: the OCR engine is making its best guess at each character, and the guess is wrong some small percentage of the time.

This distinction determines everything downstream: how fast it runs, how accurate it is, and whether you even need OCR at all. Check by trying to select text in the source. Selectable means extraction; unselectable means OCR.

The one-line diagnostic

Can you select the text with your cursor? If yes, you can extract it exactly. If no, you need OCR.

Best methods compared

Several approaches exist for getting text out of an image in 2026. They differ mainly in privacy, cost, and accuracy on hard documents.

  • In-browser OCR — the engine runs on your device via WebAssembly. Private, fast, free, and accurate on clean text. The recommended default for most work.
  • Mobile scanner apps — camera plus built-in OCR. Convenient for on-the-go documents, but they may upload to the vendor's cloud depending on the app.
  • Server-based OCR APIs — accurate, scalable, and often generous free tiers, but they receive your image and create a data-processing relationship.
  • Desktop OCR software — powerful and private, but licensed, installed, and overkill for occasional use.
  • Manual retyping — no approach is more accurate, and none is slower or more error-prone.

For the common case — one screenshot or scan that needs its text released — in-browser OCR is the best fit: it is the only option that is simultaneously accurate, free, and private. If you are processing millions of documents, a server API might earn its cost, but for the analyst, lawyer, or student with a handful of files, local recognition wins.

How a modern OCR tool recognises an image

Under the hood, an in-browser OCR tool like OCR to text runs a pipeline that is worth understanding because each stage creates a common failure mode you can recognise.

  1. Decode — the image is loaded and prepared. Screenshots decode instantly; large photos are downsampled toward the recognition sweet spot.
  2. Clean-up — automatic contrast, denoising and orientation so the recogniser sees text, not noise.
  3. Layout analysis — the engine orders the content into lines and blocks so the output reads in the right order.
  4. Recognition — a trained model maps image regions to characters, using the language model you selected.
  5. Output — the recognised text is returned for copy-paste, saved as plain text, or written into a searchable PDF.

Because the engine — Tesseract, compiled to WebAssembly — runs on your machine, your image never leaves your device. That is a meaningful privacy property, especially for screenshots of dashboards or scans of identification documents.

Step-by-step: extract text from an image

Getting usable text is a short, repeatable procedure. Use the OCR to text tool and follow these steps.

  1. Drop your image or scan onto the tool. It is read into browser memory locally.
  2. Pick the language of the text. The correct language model can be the difference between clean output and a repair job.
  3. Run the recognition. A clear screenshot resolves in seconds; a dense scan takes a few seconds more.
  4. Copy the recognised text, or download it as a plain-text file.
  5. Spot-check the highest-value lines — proper names, numbers, and any text you will copy verbatim somewhere important.

That is the entire workflow. For a clean screenshot, expect usable text within seconds and an accuracy high enough to paste straight into the document you were building.

Ready-to-use output

Good OCR tools return text with paragraphs and line breaks intact, so the output reads like a document rather than a soup of characters. Preserve layout where you can — it saves the reassembly step.

Accuracy expectations, honestly quantified

It helps to know what good looks like so you can tell when something is wrong.

  • Clean printed text at 300 DPI in the engine's language: character accuracy above 98 percent. One character in fifty wrong, usually an ambiguous one like l/1 or O/0.
  • Clean screenshots: excellent, provided the text is sharp and reasonably large.
  • Photographs of documents: good, dropping with glare, angle, and shadow.
  • Low-resolution or heavily compressed images: mediocre — this is where errors cluster.
  • Handwriting: poor — treat it as rough transcription, not a record.

The pattern is simple: accuracy tracks the quality of the input and your choice of language. If a document matters, clean up the input and pick the language, and verify the numbers — misrecognising a single digit in a financial figure is the one error you cannot afford.

Verification is part of the job

For figures that feed decisions or reports, always confirm a sample against the source. A 2 percent character-error rate is excellent — and exactly why you should not blindly trust a bank balance OCR returned.

Improving results on tricky images

When OCR returns messy text, the fixes are usually about the picture, not the engine. In order of impact:

  1. Go higher resolution — 300 DPI or more transforms mediocre OCR into good OCR.
  2. Even out the lighting — shadows and hotspots are noise to the recogniser.
  3. Straighten the image — a few degrees of skew degrades recognition more than people expect.
  4. Crop to the text — feedback from surrounding imagery confuses layout analysis.
  5. Increase contrast — black text on white is what the model was trained to read.
  6. Choose the right language — never recognise a German document with the default English model.

These are cheap, and they move more of your documents into the 'clean, trustworthy' bucket than any engine upgrade would.

Screenshots and photographs

Screenshots are the easy case and the most common. Because the text in a screenshot is rendered by your own operating system, it is sharp and high-contrast, and OCR handles it cleanly. The main caveat is tiny or heavily anti-aliased text, which can blur ambiguous letters — crop in if necessary.

Photographs of documents are harder because the camera introduces perspective, glare, and uneven exposure. The fix is to use a document scanner that corrects these before recognition. The photo scanner crops, de-skews and straightens a phone photo into a clean document, and can extract its text directly. Our guide on scanning documents with your phone covers the mobile workflow end to end.

Images locked inside a PDF

Sometimes the text is not a standalone image but sits inside a PDF — a scan, a brochure export, a fax. The same OCR works on the pages of such a PDF, with one extra step: rasterise each page, then recognise it.

The PDF to OCR tool does exactly this. It converts a scanned PDF into a searchable PDF or extracted text. Our walkthrough on making a PDF searchable with OCR is the natural companion, and the original quick guide on turning a scanned PDF into searchable text shows the 30-second version.

Privacy and confidentiality

Images often contain the most personal material a person handles: screenshots of medical records, scans of identity documents, photos of contracts. When the text inside needs extracting, think about where the pixels are going.

A server-based OCR service receives your image and becomes a processor of whatever personal data it contains. An in-browser tool never uploads the image — the recognition happens on your device and the image is discarded when you close the tab. To confirm, watch the Network tab during a job: only the application's own assets move over the wire, never your image.

For anything containing personal data, this is the difference between a compliant workflow and a new data-processing relationship. The security page and the guide on converting PDFs privately go deeper into what this means in practice.

Automating text extraction

If you extract text routinely — from subscription dashboards, web pages, or a queue of scans — you can move from one-off extraction to a repeatable workflow.

  1. Standardise the input so every job looks similar.
  2. Pick the right tool per input type: image and scan OCR for pictures, PDF OCR for scanned PDFs.
  3. Route the output into a destination — a notes app, a spreadsheet, a search index.
  4. Verify a representative sample each run, focusing on figures.

The browser extension automates the short version: right-click any image on a web page and extract its text in your language without leaving the page. And if you are building something larger, the developers page describes the building blocks and self-hosting, with configuration covered in the documentation.

Choosing the right tool in 2026

If your work is occasional and sensitive, in-browser OCR is the clear choice — private, free, and accurate on the documents people actually handle. If your work is enormous and insensitive, a server API may be worth its cost. If your work is mobile and on-the-go, a scanner app or the phone-optimised tools fit better.

There is no single right answer, but there is a clear default: local, in-browser recognition covers the common case best and forces you to trade privacy for nothing.

Going deeper: beyond the basic extract

The basic flow — drop an image, get its text — covers most needs, but three scenarios reward going slightly deeper: text locked inside tables, text mixed with graphics, and text in a language model you have not yet loaded.

For tables, remember that a screenshot or scan of a table is really two jobs: recognising the words and recovering the grid. The PDF to Excel path handles the grid for PDFs, and for images the pragmatic approach is to extract the text with OCR and rebuild the structure in a spreadsheet. For pages mixing prose and photographs, recognise the whole page but verify the prose segments separately, since captions and labels are the most common misreads. And for a language the OCR model has not cached yet, the first run downloads the model once and then works offline — so the first job is a few seconds slower and every job after is not.

All three are solvable with the same OCR to text tool you already reached for, which is the point: the tool covers the easy cases effortlessly and the harder ones with a little method, without forcing you to switch systems mid-task.

Handling sensitive images correctly

Because images so often carry identity documents, medical letters, and financial captures, a few habits keep extraction safe. Treat every image you plan to recognise as if it were sensitive until you know otherwise — that is the default that costs nothing and prevents leaks.

Prefer a tool that never uploads the image; with in-browser OCR the recognition happens on your device and the file is not retained. Be deliberate about where the extracted text lands — pasting sensitive OCR output into a chat tool or cloud clipboard creates a copy that may outlive you, so route it to the destination you actually control. And if you are an organisation, extend the same retention and access controls to your extraction output that you already apply to your other sensitive data, because OCR text of a personal document is personal data under the same rules as the document itself. The privacy guide and the security page lay out the controls in detail.

Diagnosing what went wrong

When OCR output disappoints, a little diagnosis is faster than re-shooting everything. Walk the likely causes in order and most failures resolve in one attempt.

  • Is it sharp and lit even? — blur and shadow are the two biggest accuracy killers. Re-shoot or re-scan before blaming the engine.
  • Is it the right language? — recognising non-English text with the default model multiplies errors. Re-run with the document's language selected.
  • Is the image big enough? — text smaller than about 12pt equivalent strains recognition. Crop in and enlarge rather than accepting garbage.
  • Is the layout confusing it? — dense tables and mixed prose can trip column detection; isolate the region of interest.
  • Is the source exceptionally hard? — handwriting, worn type, and heavy speckle genuinely degrade accuracy; treat those as transcription, not extraction.

Diagnosing in this order means you fix the highest-leverage cause first and rarely over-engineer. The good news is that the fixes are cheap — most are about the input, not the tool, and improving the input improves every downstream use of the text.

Getting started

Extracting text from an image is a two-minute job when you know the workflow. Start with the OCR to text tool for pictures and screenshots, use the PDF to OCR tool for scans, and pair them with a photo scanner when the source is your camera. When you want to standardise it, check pricing, grab the downloads, and explore the documentation. The blog has guides for every neighbouring task.

Frequently asked questions

How do I extract text from an image?
Run the image through an OCR tool. Upload or drop the image, let it recognise the characters with its trained model, and copy out the text. Choose a tool that processes locally so the image is not uploaded.
What is the most accurate way to extract text from a scan?
Use a high-resolution (300 DPI), well-lit, de-skewed scan with a tool that lets you select the document language. Clean input is the biggest accuracy lever; the language model is the second.
Can I extract text from a screenshot?
Yes. Screenshots are just images, and a good OCR tool handles them well, especially if the text is clear and not anti-aliased into illegibility.
Does extracting text from an image upload the image online?
Only if the tool is server-based. An in-browser OCR tool processes the image entirely on your device, so nothing is uploaded.
Why is OCR text sometimes wrong?
OCR infers characters from pixels, so low resolution, blur, shadows, unusual fonts, and handwriting all increase error. Clean printed text reaches above 98 percent accuracy; the error cases are the exceptions, not the rule.
Can I extract text from a PDF directly to plain text?
If the PDF has a text layer, yes — extraction is exact and instant. If it is a scan, the text layer must be created by OCR first. The [OCR to text](/tools/ocr-to-text) tool handles the image and scan cases.
MN

Marek Novák

Engineering Lead at nctools