Loading
Code Deb

Nepali and English OCR: Extract Text from Images and Scanned PDFs

How browser OCR works with Tesseract, what the Nepali model can recognize and why scanned PDFs require rendering before text extraction.

Nepali and English OCR: Extract Text from Images and Scanned PDFs | Code Deb

Optical character recognition, or OCR, tries to identify written text from images. It can help extract a printed notice, invoice, document scan or photograph into editable text. Unlike copying text from a normal digital PDF, OCR must infer characters from pixels and can make mistakes.

The Code Deb Image and PDF OCR Tool processes JPG, PNG, WebP, BMP and short PDF documents locally in a browser, using Tesseract.js and English, Nepali or combined language models. It outputs plain text for editing, copying and download.

What the Nepali language model supports

The Tesseract project publishes Nepali (nep) trained data, including a fast LSTM model. The model can recognize Devanagari printed text, although success depends on scan quality, typography and the individual document. Proofread proper names, conjuncts, Nepali numerals and critical financial or legal values.

Why OCR of PDFs requires rendering

Tesseract.js does not natively recognize PDF files. The Code Deb tool uses PDF.js to render pages to canvases, then passes those rendered images to Tesseract. This works with scanned pages, but it can be slower than extracting an existing text layer. The current browser tool limits each run to six PDF pages.

Preparing a document for better recognition

  1. Use a sharp, upright image with clear, high-contrast text.
  2. Avoid harsh shadows, skewed scans and cropped lines.
  3. Choose English, Nepali or English plus Nepali according to the document.
  4. Run OCR and proofread the text in the editable results panel.
  5. Download TXT only after checking layout, numbers and names.

What OCR does not preserve

The tool extracts plain text. It does not preserve fonts, multi-column page positioning, tables, hyperlinks, form fields or an existing cryptographic signature. It does not create a searchable PDF. Handwriting recognition is not guaranteed and can be particularly unreliable on informal Nepali handwriting.

Privacy and download behavior

OCR runs on the local device. The engine, worker and trained data may be downloaded from CDNs on first use; the selected document bytes are not uploaded to Code Deb. On slower computers, large scans take longer to process and use more memory.

Primary references

More from Code Deb

Read about our agency, explore available services, or contact the team for a project discussion.