Extract Text from a PDF to a TXT File

To extract text from a PDF with OnCloudPDF, upload the file, click Extract Text, preview the result and download a plain .txt file.

  • Processed in your browser
  • No upload
  • No account
  1. 1Choose file
  2. 2Adjust and run
  3. 3Download

or drop a file here, or paste one with Ctrl V

Good to know: Only text that is embedded in the PDF is extracted. Scanned or image-only pages have none; if the PDF has no text layer the tool says so and suggests OCR PDF. All limits

To extract text from a PDF with OnCloudPDF, upload the file, click Extract Text, preview the result and download a plain .txt file. It reads the text already embedded in the PDF, so for a scan with no text layer it says so and suggests running OCR first.

Updated · Runs in your browser, no upload, no account

How to use PDF to Text

  1. Select your PDF file, or drag it onto the page.
  2. Click Extract Text; every page is read for its text content.
  3. Check the preview of the extracted text.
  4. Download the .txt file, named after your PDF.

What it does and what it does not do

  • Only text that is embedded in the PDF is extracted. Scanned or image-only pages have none; if the PDF has no text layer the tool says so and suggests OCR PDF.
  • Output is plain text only. Fonts, bold, tables, images and layout are not included.
  • Each page is introduced by a marker line such as --- Page 1 --- and the text items on a page are joined with spaces into one block, so original line breaks and paragraph breaks are not kept.
  • All pages are processed; there is no option to extract a page range. Extract the pages you want first with Extract Pages if you need a subset.
  • No file-size or page limit is enforced by the tool; browser memory is the practical limit. The result is a single .txt, not a ZIP.
  • Arabic and other right-to-left text may come out with separated letters or in the wrong order.
  • Password-protected (encrypted) PDFs are refused with a clear message, because OnCloudPDF cannot open them yet; remove the password in another program first.

Is my file uploaded?

Text is read from the PDF and the .txt file is created entirely in your browser, so your document is never uploaded. The pdf.js worker that reads PDFs is served from OnCloudPDF's own domain, so no third-party server is contacted to open your file.

Copy text out of a PDF that blocks selection in your viewer

Some PDF viewers make it awkward to select or copy text across many pages. Extracting the whole document to a .txt gives you every page's text in one file you can search or paste anywhere. This only works when the text is really present in the PDF; it does not bypass passwords (protected files are refused; remove the password elsewhere first) and it cannot read text that exists only inside images.

Extract text from a scanned PDF

A scan is a picture of a page, so there is no text for this tool to read. Run the file through OCR first, which recognises the characters and adds a text layer to the PDF, then use PDF to Text on the result. Recognition accuracy depends on scan quality and language, and the output will still be plain text without layout.

Ways to get text out of a PDF

Ways to get text out of a PDF
CriteriaOnCloudPDF (browser)Server-based online toolsDesktop software
Where the file is processedIn your browserOn the provider's serverOn your computer
OutputOne .txt with page markersVaries by providerVaries; copy-paste, export or command-line tools
Scanned PDFsNot read directly; run OCR firstVaries by providerVaries; many include OCR
Install or account neededNo install; no accountVaries by providerInstall required for most
Best forFast whole-document extraction without uploadingConvenience on any deviceLayout-aware or batch extraction

Frequently asked questions

Does PDF to Text work on scanned PDFs?

Only if the scan already has a text layer. The tool reads embedded text and does not recognise characters in images, so for an image-only PDF the tool reports that there is no text and suggests OCR PDF. Use OCR first to add a text layer.

Will tables and formatting be kept?

No. The result is plain text in reading order. Tables, fonts, images and layout are not preserved, and line breaks within a page are not retained because the text pieces are joined with spaces.

Can I extract text from only some pages?

Not with this tool; it always processes every page. To limit the output, create a smaller PDF with Extract Pages first and convert that.

What does the text file look like?

It is a UTF-compatible plain text file. Each page starts with a line like --- Page 3 --- followed by that page's text on a single block, so you can tell where pages begin.

Is my PDF sent to a server?

No. The text is read and the file is built in your browser. The PDF.js worker script is served from OnCloudPDF's own domain, and it does not receive your document.

Guides

See every tool and its limits on the PDF tools overview, or compare approaches in free PDF tools compared.