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.
| Input | How pages and paragraphs are formed |
|---|---|
| One page per PDF page. Paragraphs split only at blank lines, so typically one per page | |
| DOCX | One page. Each paragraph is kept; each table row becomes a paragraph with cells joined by | |
| EPUB | One 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 |
| TXT | One 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:
| Target | Result |
|---|---|
| TXT | Paragraphs separated by one blank line, pages by two |
| DOCX | Plain paragraphs, with a page break between pages and no heading styles |
| EPUB | Title from the file name, author from the source or GoConvertFiles |
| A 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 source | DOCX | EPUB | TXT | |
|---|---|---|---|---|
| Heading | merged into the page's one paragraph | own paragraph, Title and Heading styles dropped | own paragraph, no heading tag | own paragraph (blank lines around it) |
| Bold and italic words | words kept, formatting dropped | words kept, formatting dropped | words kept, formatting dropped | plain text |
| Link | text kept, web address dropped | text kept, web address dropped | text kept, web address dropped | plain text |
| Bullet list | the • characters stay in the text | one paragraph per item, bullets and numbers dropped | one paragraph per item, no marker | dash lines with no blank line between them merge into one paragraph |
| Table | cells in reading order, separated by spaces | Item | Qty | Price, one paragraph per row | Item | Qty | Price, header row included | tab-separated rows merge into one paragraph: Item Qty Price Pens 12 3.50 |
| Image | dropped | dropped | dropped | not in this file |
| Accents, Greek, Japanese, emoji | café, naïve, Zürich, €12 kept (the PDF had only Latin text) | all kept | all kept | all kept |
| Line break inside a paragraph | joined with a space | kept as a line break in TXT output | a space | a space |
| Two columns | left column first, then the right | not in this file | not in this file | not in this file |
| 300-word paragraph | 1,635 characters, intact | intact | intact | intact |
| Paragraph count the tool showed | 3 (one per page) | 15 | 17 | 6 |
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
| Conversion | Downloaded as | Bytes (Chrome 157 / Firefox 155 / the WebKit build) | Inside |
|---|---|---|---|
| PDF to DOCX | sample.docx | 1,420 / 1,427 / 1,418 | 3 paragraphs, 2 page breaks, page size 8.5 x 11 in taken from the PDF, 1-inch margins |
| PDF to EPUB | sample.epub | 2,717 / 2,727 / 2,721 | 3 chapter files, one per PDF page; title sample, creator GoConvertFiles, language en |
| PDF to TXT | sample.txt | 2,192 in all three | pages separated by two blank lines |
| DOCX to EPUB | sample.epub | 2,005 / 2,013 / 2,006 | one chapter of 15 paragraphs |
| DOCX to TXT | sample.txt | 1,964 in all three | 15 paragraphs, one blank line between them |
| EPUB to DOCX | Field Notes EPUB.docx | 1,328 / 1,331 / 1,329 | named after the book's title; 2 page breaks for 3 chapters; no page size, so Word uses its default |
| EPUB to TXT | Field Notes EPUB.txt | 2,044 in all three | 17 paragraphs |
| TXT to DOCX | sample.docx | 1,227 / 1,231 / 1,221 | 6 paragraphs, no page size |
| TXT to EPUB | sample.epub | 1,953 / 1,958 / 1,951 | one 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
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.
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.
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.