Split PDF: Unspread 2-up pages

Drop or choose your PDF file.

Privacy: Your PDF file is not sent to any server; everything happens locally in your browser. To verify this, you can disconnect from the internet after loading this page, or even simply save this page (everything is self-contained in a single HTML file) and use it offline.


What's this?

Sometimes you may have a PDF that contains some two-page spreads (the “left” and “right” pages, also known as verso and recto) on a single PDF page. If you want to turn such a PDF into a “regular” PDF, “upload” it above, and click on the link to download a new PDF file with split pages.

To account for the common case where the PDF may also contain some non-spread pages (front cover, etc.), this splits only the pages that have width greater than height. Edit the code if you don't want this feature. If you're working with right-to-left PDFs (in Hebrew, Arabic, etc), see this variant.

Thanks

The code rearranges pages using pdf-lib (GitHub) (v1.11.1) by Andrew Dillon. I tried to use Mozilla's PDF.js, but its documentation on these “core” matters (as opposed to just rendering a PDF in a canvas or whatever) seems poor/nonexistent compared to pdf-lib, which is excellent.

This page borrows heavily from a couple of pages I wrote earlier for other purposes: Möbius-printing helper, Extract PDF pages.

Contact: My name is Shreevatsa; my email address is my name AT gmail.com. Or leave a comment on this answer.

—October 2020