viewhack

Open Pages, Numbers and Keynote files without a Mac

Someone sent you a .pages, .numbers or .key file from a Mac or an iPhone, and Windows, Android or Linux has nothing that opens it. Drop it here: you get the document's text, every slide with its speaker notes, the tables as a grid you can save as CSV, the preview picture Apple saved inside it, and every picture it holds.

The file is read on your device. It is not uploaded, and nothing in it is fetched or run.

What it shows

What is inside a .pages file

Since 2013, a Pages, Numbers or Keynote file is a ZIP archive, which is why the first two bytes above are PK. Renaming it to .zip and unzipping it gives you preview.jpg and the pictures in Data/, but not the text. The text is in Index/Document.iwa and the other .iwa files: Apple's own object archives, compressed with Google's Snappy (in a variant with no checksums) and encoded as Protocol Buffers. No Windows program reads them, and Microsoft Word, Excel and PowerPoint do not open iWork files at all.

This page unpacks the .iwa files with a Snappy decoder and a Protocol Buffers reader written for it, following Sean O'Brien's public description of the format (github.com/obriensp/iWorkFileFormat). Text lives in objects of type 2001 (a text storage); Pages marks the running text as the body storage. Keynote keeps the order of the slides in a separate slide list, which matters: in Apache Tika's Keynote test file, the first slide shown is stored in Index/Slide-2.iwa, the second in Slide-1.iwa and the third in Slide.iwa. Reading the files in name order would put the title slide second, so the slide list is followed, and the page says so if it cannot be read.

Files it opens

Pages, Numbers and Keynote 2013 and later
Every version since Pages 5, Numbers 3 and Keynote 6 on the Mac (October 2013), and the iPhone, iPad and iCloud versions: all save the same single-file format. Text, slides, notes, tables, preview and pictures.
A document that arrived as a folder
A Mac can keep a document as a folder (a "package") holding Index.zip, Data/ and Metadata/. Copied to Windows by USB stick or a file share, it shows up as a folder named like Report.pages. Zip that folder (right-click, Send to, Compressed folder) and drop the .zip here: it is read from inside the folder, Index.zip included. Most files arrive as a single file, which opens as it is.
iWork '09 (2009 to 2013)
An older XML format (index.xml, or index.apxl for Keynote). viewhack shows its thumbnail and its embedded PDF when it has one; reading the text is only done for 2013-and-later files.

What this cannot do