About Epubfy
Epubfy is an independent project with one goal: turn the PDFs people actually have — books, course material, reports, papers — into ebooks that are pleasant to read on a phone or an e-reader, without changing a single word.
Why it exists
Most PDF to EPUB converters treat a PDF as a stream of lines. The result technically opens in an e-reader, but page numbers sit in the middle of sentences, every line of the original page becomes its own paragraph, and two-column pages come out as a jumble. Reading that on a Kindle is often worse than squinting at the original PDF.
Tools that go the other way — feeding the whole document to a language model and asking it to "rewrite it as an ebook" — produce tidy output, but you can no longer trust that the text is the author's. Sentences get reworded, paragraphs go missing. For a novel that's annoying; for a textbook, a contract or a tax guide it's a real problem.
Epubfy takes a middle path: understand the layout like a person would, then copy the text exactly.
How a conversion works
- Every page is measured. Font sizes and styles, line positions, column gutters, images and drawn figures. Columns are found by looking for vertical gaps that no line crosses, so two- and three-column pages are read top to bottom, column by column.
- Page furniture is removed. Running headers, footers and page numbers are recognized because they repeat at the same position, in the same style, separated from the text by white space — even when the wording changes from chapter to chapter.
- AI proposes the structure, nothing else. A language model sees the font summary and sample lines and answers one question: which styles are chapter, section and subsection headings? It never sees the whole book and never writes text into it.
- The plan is checked against the whole document. A rule that matches nothing, or that catches ordinary paragraphs, is sent back to be fixed or dropped. Heading styles the plan missed are pointed out too.
- The text is copied and rejoined. Lines become paragraphs again; words hyphenated at a line end are rejoined — unless the same hyphenated word appears elsewhere in the document, in which case its hyphen is kept. Code keeps its line breaks and indentation, footnotes are collected at the end of each chapter.
- The text is accounted for. Epubfy counts the characters it read from the PDF and the characters it wrote into the EPUB. In testing the two have to match, and live conversions are monitored for gaps.
If you'd rather not rely on AI for a particular book, the result screen has a basic mode that finds headings by font size alone. The text is identical in both modes.
How it's tested
Changes to the converter are checked on a set of real, very different documents before they go live:
- a novel laid out as a letter-size PDF with a running header and page numbers on every page,
- a programming textbook with code listings, diagrams and three levels of headings,
- two research papers, one of them in a two-column layout with footnotes,
- a 140-page government publication set in two and three columns, with side notes and four levels of headings,
- damaged, password-protected, scanned and blank PDFs, to make sure they fail with a clear message.
The EPUB files are validated with EPUBCheck, the official checker maintained by the W3C, the same check ebook stores such as Google Play Books require publishers' files to pass. Many of the converter's rules exist because one of these documents came out wrong — the guide on converting without losing formatting describes some of those cases.
What it can't do (yet)
- Scanned PDFs. Pages that are photos have no text to reflow; that needs OCR, which Epubfy doesn't do yet.
- Heavy maths and complex tables. Small tables drawn with lines may be kept as pictures, larger ones come out as lines of text, and equations are copied as text and can lose their layout.
- Designed layouts. Comics, magazines, slides and forms depend on their page design and are better kept as PDF.
Your files
Your PDF is deleted as soon as it has been read, and the EPUB 60 minutes later. There's no account and no tracking cookie. A short sample of lines is shown to the AI service to recognize the headings; the full document never is. The privacy policy has the details.