Document Converter

Published Updated

Convert between PDF, DOCX, EPUB and TXT by pulling out the text and rebuilding it in the new format. A PDF page usually arrives as one paragraph, and choosing PDF as the target opens your print dialog to Save as PDF.

What is read from each input

Every conversion goes through the same step: a list of pages, each a list of text paragraphs.

InputHow pages and paragraphs are formed
PDFOne page per PDF page. Paragraphs split only at blank lines, so typically one per page
DOCXOne page. Each paragraph is kept; each table row becomes a paragraph with cells joined by |
EPUBOne page per chapter. Each block element (p, headings, li, div, blockquote) starts a paragraph, text outside any block is kept, and each table row becomes one paragraph with its cells joined by a vertical bar. Title and author are kept
TXTOne page. Paragraphs split at blank lines; single line breaks become spaces

The EPUB format lists the creator as an optional element (W3C EPUB 3.3), which is why a missing author can be filled in.

What is written

Targets compared:

TargetResult
TXTParagraphs separated by one blank line, pages by two
DOCXPlain paragraphs, with a page break between pages and no heading styles
EPUBTitle from the file name, author from the source or GoConvertFiles
PDFA printable page in a serif font, opened in the print dialog, one section per page

Because only text moves, this suits a text-first job. For layout, use the dedicated tools: DOCX to PDF renders tables, and PDF to Word has its own page.

Four generated files through the converter

Four generated files (a PDF, a DOCX, an EPUB and a TXT file with the same kinds of content) went to every target except PDF, in Google Chrome 157, Firefox 155 and Playwright's WebKit build (not the Safari app). The text that came out was identical in all three browsers. What survived:

In the sourcePDFDOCXEPUBTXT
Headingmerged into the page's one paragraphown paragraph, Title and Heading styles droppedown paragraph, no heading tagown paragraph (blank lines around it)
Bold and italic wordswords kept, formatting droppedwords kept, formatting droppedwords kept, formatting droppedplain text
Linktext kept, web address droppedtext kept, web address droppedtext kept, web address droppedplain text
Bullet listthe • characters stay in the textone paragraph per item, bullets and numbers droppedone paragraph per item, no markerdash lines with no blank line between them merge into one paragraph
Tablecells in reading order, separated by spacesItem | Qty | Price, one paragraph per rowItem | Qty | Price, header row includedtab-separated rows merge into one paragraph: Item Qty Price Pens 12 3.50
Imagedroppeddroppeddroppednot in this file
Accents, Greek, Japanese, emojicafé, naïve, Zürich, €12 kept (the PDF had only Latin text)all keptall keptall kept
Line break inside a paragraphjoined with a spacekept as a line break in TXT outputa spacea space
Two columnsleft column first, then the rightnot in this filenot in this filenot in this file
300-word paragraph1,635 characters, intactintactintactintact
Paragraph count the tool showed3 (one per page)15176

The DOCX file's running header and its page break were not carried over, and the empty paragraph was dropped. The TXT file's byte order mark did not reach the output, and its Windows (CRLF) line breaks were read like plain ones.

Output files, names and sizes

ConversionDownloaded asBytes (Chrome 157 / Firefox 155 / the WebKit build)Inside
PDF to DOCXsample.docx1,420 / 1,427 / 1,4183 paragraphs, 2 page breaks, page size 8.5 x 11 in taken from the PDF, 1-inch margins
PDF to EPUBsample.epub2,717 / 2,727 / 2,7213 chapter files, one per PDF page; title sample, creator GoConvertFiles, language en
PDF to TXTsample.txt2,192 in all threepages separated by two blank lines
DOCX to EPUBsample.epub2,005 / 2,013 / 2,006one chapter of 15 paragraphs
DOCX to TXTsample.txt1,964 in all three15 paragraphs, one blank line between them
EPUB to DOCXField Notes EPUB.docx1,328 / 1,331 / 1,329named after the book's title; 2 page breaks for 3 chapters; no page size, so Word uses its default
EPUB to TXTField Notes EPUB.txt2,044 in all three17 paragraphs
TXT to DOCXsample.docx1,227 / 1,231 / 1,2216 paragraphs, no page size
TXT to EPUBsample.epub1,953 / 1,958 / 1,951one chapter of 6 paragraphs

The text inside each zipped file was the same in every browser. The byte counts differ because each browser's built-in compressor packs the same text slightly differently, and each EPUB gets a new random identifier, so its size can move by a few bytes between conversions (2,719 and then 2,717 bytes for the same PDF in two Chrome 157 runs). The PDF target makes no file of its own: the code writes the paragraphs into a hidden frame as a page set in Georgia (or Times New Roman), with the title as a heading and a page break after each source page, then calls the browser's print function.

Converting a document

  1. Step 1

    Add a PDF, DOCX, EPUB or TXT file

    The format is read from the file extension. The text is extracted at once, and a paragraph count appears.

  2. Step 2

    Choose the target format

    The other three formats are offered. A PDF input defaults to Word, and every other input defaults to PDF.

  3. Step 3

    Convert and save

    DOCX, EPUB and TXT download as files. PDF opens the print dialog instead, where you choose Save as PDF.

When to pick another tool

For a PDF you only want as plain text, PDF to Text is the narrower tool. For ebooks, Ebook Converter covers PDF and EPUB in both directions. PDFs that stop short at the page edge show a warning here, because text near the margin may have been clipped.

Document conversion questions

Why is each PDF page a single paragraph?

Paragraph breaks are taken only from blank lines in the PDF's text, and most PDFs have none. A test page with a heading and three separate paragraphs came out as one block, heading included. Layout is not used to split it.

Why does converting to PDF open a print dialog?

The tool builds a printable page and calls the browser's print function, which, per MDN, opens the print dialog. Save as PDF there is what makes the file. The Print / Save PDF button reopens it if you cancelled.

Do headings, images and fonts survive?

No. Only text survives, as plain paragraphs. Word and EPUB tables become lines of cells joined by vertical bars, and images, styles, headers, footnotes and fonts are not carried across.

Why does my EPUB list GoConvertFiles as the author?

When the source has no author, which is the case for PDF, DOCX and TXT, the EPUB's creator field is set to GoConvertFiles. The title is the file name. Both are in the book's metadata, and you can edit them in an ebook manager.

Why did my line breaks vanish in a TXT file?

For TXT input, a paragraph ends at a blank line, and single line breaks inside it are folded into spaces. Hard-wrapped poems or code run together. Separate verses with blank lines to keep them apart.

Can it read scanned PDFs?

Only if they carry a text layer. A scan that is only pictures has no text to extract, so the result is empty. There is no text recognition.

What happens to tables?

It depends on the source. In a PDF the cells stay in reading order, separated by spaces, inside the page's paragraph. Word and EPUB tables become one paragraph per row with the cells joined by vertical bars: the test table gave Item | Qty | Price and Pens | 12 | 3.50. Tab-separated rows in a TXT file merge into one paragraph unless blank lines separate them.

Are bullet points and numbering kept?

Only when they are typed characters. The • bullets in the test PDF stayed in the text. Word list marks are numbering, not text, so First bullet and First numbered came out as plain paragraphs with no mark. EPUB list items become paragraphs without markers.

Can it read a UTF-16 text file?

Yes, when the file starts with a byte order mark, which is how Notepad saves Unicode text. A generated UTF-16 file with café and 日本語 gave the same two paragraphs in Chrome 157, Firefox 155 and the WebKit build. A text file without a byte order mark is read as UTF-8.

Why is my converted EPUB named after the book, not the file?

For EPUB input the tool uses the title stored in the book. The test file sample.epub, titled Field Notes EPUB, downloaded as Field Notes EPUB.docx and Field Notes EPUB.txt. PDF, DOCX and TXT files keep their own file name.

Related Tools