Image Text Extractor (OCR)
Extract text from any image using Tesseract.js OCR — 100% client-side.
关于此工具
Image Text Extractor runs Tesseract.js (v5) directly in your browser to perform optical character recognition on uploaded images. Drag-and-drop or click to upload a PNG, JPG, or WEBP file, choose the recognition language, and watch a live progress bar as the text is extracted. Results appear in an editable textarea with a one-click Copy button. A confidence score lets you know how reliable the extraction is. No image is ever sent to a server — all processing happens locally via WebAssembly.
使用方法
- 1 Drag-and-drop your image onto the upload area, or click to browse.
- 2 Select the text language from the dropdown.
- 3 Click Extract Text and wait for the progress bar to complete.
- 4 Review the extracted text and confidence score.
- 5 Click Copy to copy the text to your clipboard.
How optical character recognition turns pixels into text
Optical character recognition (OCR) is the process of looking at an image of writing and reconstructing the actual characters as editable, copyable text. This tool runs Tesseract.js v5, a WebAssembly build of the long-established Tesseract engine, directly inside your browser tab. When you press Extract Text, the engine first binarises the image (separating dark ink from light background), detects lines and word boundaries, isolates each glyph, and then matches the shape of every glyph against a trained statistical model for the language you selected. The newer Tesseract pipeline uses an LSTM neural network that reads whole lines in sequence rather than one isolated letter at a time, which is why it copes well with joined or slightly irregular text.
Because the recogniser is language-specific, picking the right language matters. Choosing eng tells the engine to expect Latin letters and English letter-frequency patterns; choosing jpn or chi_sim loads an entirely different character model. The language data file is downloaded on demand the first time you use a language, so the first run in a new language is slower while that trained model loads.
What the confidence score actually means
After extraction, the tool shows a confidence percentage. This is not a measure of whether the text is "correct" in a grammatical sense — it is the engine's averaged certainty about its own character guesses across the page. The tool colour-codes it: green at 80 percent and above, yellow between 50 and 80, and red below 50. A red score is a signal to distrust the output and re-scan a cleaner image, not proof that every word is wrong.
A worked example
Suppose you photograph a printed receipt and upload the JPG. Tesseract.js loads (you see "Loading Tesseract.js…", then "Recognizing text…" with a live progress bar climbing toward 100 percent), reads the line TOTAL 12.50, and returns it as plain text in the editable box with a confidence of, say, 91 percent. If instead you upload a blurry photo of a handwritten sticky note, the engine may emit T0TAl l2.5O with a confidence of 38 percent — the zeros and capital-O, and the ones and lowercase-L, are visually ambiguous, so the model hedges and the score drops. The fix is almost always a better input image, not a different setting.
Practical tips for accurate extraction
- Crop to the text. Remove backgrounds, hands, and shadows. The fewer non-text pixels the engine has to reject, the better it segments lines.
- Increase contrast. Dark text on a plain light background recognises far better than low-contrast or coloured-on-coloured text. Convert to grayscale and boost contrast before uploading if you can.
- Aim for resolution, not just size. Tesseract prefers roughly 300 DPI equivalent. Text that is only 10–12 pixels tall is hard to read; rescale small captures upward before uploading.
- Keep text upright. The engine handles slight skew, but a page rotated 90 degrees will produce garbage. Straighten first.
- Match the language. Running French text through the English model will misread accented characters. Switch the dropdown to
frafirst.
Common use cases
OCR earns its keep wherever text is trapped inside an image: copying a paragraph out of a screenshot, lifting a serial number off a photographed label, digitising a quote from a book page, pulling text out of a scanned form, or extracting an address from a picture of a business card. Because the output lands in an editable text area, you can fix the inevitable one or two misreads by hand and then copy clean text with the Copy button.
Common mistakes
- Expecting perfect layout. OCR returns the words, but complex multi-column layouts and tables may come back in an unexpected reading order. For tabular data, scan one column at a time.
- Trusting decorative fonts. Stylised, condensed, or script fonts trip up the model. Standard serif and sans-serif body text is what it is trained on.
- Ignoring a low score. A 40 percent confidence result should be proofread word by word, not pasted blindly.
Is my image uploaded anywhere?
No. Tesseract.js runs entirely in your browser through WebAssembly, and the only network request it makes is to fetch the open-source engine and the trained language model from a public CDN the first time you use them. The image you select is read locally via the browser's File API and is never transmitted to BoxTool's servers. Once the engine and language file are cached, you can extract text with the network disconnected.