Blog · EPUB

How to Read EPUB Books in a Browser

No install, no account

A browser already knows how to display HTML, and an EPUB is HTML in a ZIP file. That is why a web page can unpack a book and show it without any plug-in. The steps below use PDFSwift’s EPUB Reader, where the file is read by the page and never sent to a server.

Reading a book

  1. Open the EPUB Reader.
  2. Drag the .epub file onto the drop area, or press the button to choose it.
  3. Press Open book in reader.
  4. Pick a section from the menu or use Previous and Next.
  5. Use A+ and A− to change the text size, and Dark for a dark theme.

The menu lists the book’s own table of contents entries. If the book has none, sections are numbered in reading order.

What the reader changes for safety

A book is untrusted input. An EPUB 3 file is allowed to contain scripts, and a malicious or sloppy one could try to load things from the internet. The reader therefore filters each chapter before showing it:

The consequence is that interactive books lose their interactivity. Text, images, tables and lists display normally.

Right-to-left and other scripts

The reader looks at the book’s declared language. If it is Arabic, Hebrew, Persian or Urdu, the page direction is set to right to left and the text is shaped by your browser, which handles joining letters correctly. Fonts come from your system. If characters appear as squares, your system has no font for that script, and installing one fixes it for every site, not just this one.

Limits to expect

When a chapter looks broken

Blank pages and missing pictures are usually structural: an image path that does not match the archive, or a chapter that is not well-formed XML. Run the file through the EPUB Validator to see which file is at fault. If you only need the words, EPUB to TXT extracts them without caring about layout.

Browser reader or reading app?

Browser readerReading app
SetupNoneInstall and import
Reading position, bookmarks, highlightsNot keptKept
Library, search across booksNoYes
PrivacyFile stays on your device; nothing storedDepends on the app and its sync
Fonts and typographySystem fonts, book CSS filteredUsually richer, may use embedded fonts
Best forChecking a book, reading one chapter, an unfamiliar computerLong reading and a collection

A good use: checking a freshly converted or downloaded book

Before putting a file in your library, open it in the browser reader and check these things in order:

  1. The title and language shown in the status line are right.
  2. The section menu has sensible names and the count matches what you expect.
  3. Open the first chapter, a middle chapter and the last chapter: is the text complete, are paragraphs separated, do special characters look right?
  4. Open a chapter that should have an image or table.

Two minutes here saves finding out about a broken book on a plane. If something fails, the validator will say which file or reference is responsible.

Keyboard and accessibility

All controls in the reader are standard buttons and a labelled menu, so they work with the keyboard (Tab to move, Enter or Space to activate) and with screen readers. The chapter text is shown in a frame that you can scroll with the arrow keys once it has focus. Text can be enlarged with the A+ button or with your browser’s zoom, and the dark theme helps in low light.

Copying, printing and saving

You can select and copy text from the frame as in any web page. To keep a chapter or the whole book as text, use EPUB Text Extractor or EPUB to TXT. To print, use EPUB to PDF, which lays out the whole book for paper instead of printing only the visible frame.