← AI ToolsAI UTILITY

🔎 AI OCR

Drop a scanned PDF or image. PDFSwift OCR extracts readable text in your browser session via the site AI.

Your result will appear here.
Live AI: OCR runs on Google Gemma 4 vision through PDFSwift's own server endpoint. Pages are rendered to images in your browser, then sent for text extraction.

Pictures go out. Characters come back

On the OCR page the task name is ocr. If you dropped a file, the page renders page images in the browser and posts each one to /api/ocr. The Worker sends the image to the vision model list with a prompt to return plain text only, in reading order, and tries more than one payload shape until some text comes back. The completion budget is about 1,800 tokens per call. Empty responses are skipped. If every attempt fails, you get an error, not a guessed paragraph from a different document.

This is the opposite of Merge. The page image leaves the machine. HTTPS protects the POST. It does not keep the scan local. Do not OCR a passport “to see if it works.”

OCR
EndpointPOST /api/ocr with the image
InstructionVisible text only. Do not invent
LayoutNot a table rebuild
Already-selectable PDFUse PDF to Word instead

Ink you still have to read

A photographed invoice

Upright, in focus, one page at a time if the set is long. Check the total, the tax, and the invoice number against the photo before the numbers enter a ledger.

Handwriting in a margin

Expect misses. If the margin changes the deal, type it. A blank line in the transcript is not proof the margin was blank.

A table

The words may arrive in row order or in a heap. Rebuild the grid from the image. Do not paste the heap into a spreadsheet and sort it.

Then a translation

Translate the corrected transcript, not the raw OCR. A misread name, translated, is harder to catch than a misread name in the original script.

Upright, one page, then the digits

  1. Rotate and crop the scan so the text is upright and the page is the page, not a thumb.
  2. Drop it. Run OCR. Copy the text out.
  3. Read every digit and every proper noun against the image.
  4. Only then summarize, translate, or paste into Word. Keep the image. The transcript is not the record.

OCR for scanned documents is the total that changed by one digit.

One page, then the total

Each image is its own POST to /api/ocr. A failure on page 4 does not erase a good transcript of page 1, and it does not mean page 4 was blank. Re-run that page after you crop the thumb and straighten it. Compare the invoice total, the tax line, and any handwritten amount to the picture before the text is copied into a sheet. A model that was told not to invent can still misread a digit. The instruction reduces empty guesses. It does not proof the page. Rotate first. Sideways ink is where a confident wrong word comes from. A page that already has selectable text does not belong here. PDF to Word will read that layer without guessing a character.

Frequently asked questions

Is the transcript the same as a text layer?

No. You get a guess at the ink. The prompt says to extract visible text, keep reading order, and not invent missing text. A smudge can still become a digit. Proof every number you might type into another system.

What is actually uploaded?

For images, each page is posted to /api/ocr as an image payload. The Worker tries the OCR model list and returns text. It does not store the image in a database in this code. You still sent the picture of the page.

A stamp and a handwriting line vanished.

They may not have been recognized, or they were recognized as the wrong characters. Zoom the source. If the line is the point of the page, type it yourself. Do not let a blank in the transcript become “not signed.”

Why is the order scrambled?

Two columns and a footer often read as one stream. The model is asked for reading order. It does not get a layout file. Rebuild the table from the picture if the numbers are in a grid.

Should I OCR a PDF that already highlights?

No. PDF to Word will take the real text layer and will not misread a 5 as an S. OCR is for pages where selection does nothing.

Can I rotate inside OCR?

Rotate the PDF first. Sideways text is a different problem, and the model will sometimes “correct” it into words that were not there.