← Blog

Formats

DOCX, XLSX, EPUB, and APK Are Actually ZIP Archives

You probably use DOCX documents, XLSX spreadsheets, EPUB ebooks, or APK applications without thinking about how they're structured.

But here's something interesting: these four file types use ZIP-based containers.

That means their internal contents can often be inspected using an archive application.

For example, if you make a copy of a DOCX file and change its extension to .zip, you may be able to open it and discover folders, XML documents, images, and other resources.

So why aren't these files simply called ZIP archives?

Because their internal structures follow specific rules that give them their intended purpose.

Why do these files use ZIP?

ZIP is a popular archive format that can store multiple files and folders inside a single compressed package.

It's useful because it allows different resources to be grouped together, compressed, and transferred as one file.

Some modern file formats use ZIP as the foundation for packaging more complex information.

Instead of storing everything in one large binary structure, they organize their contents into separate parts.

Let's look at four examples.

1. DOCX: A Word document inside a ZIP package

A DOCX file is the standard modern Word document format.

Inside it, you'll find several XML files and folders that describe the document.

For example:

Internal componentPurpose
word/document.xmlMain document content
word/styles.xmlDocument styles
word/media/Images and other media
word/header*.xmlHeader content
word/footer*.xmlFooter content
docProps/Document properties

This structure allows Word to store text, formatting, images, relationships, and other information in organized parts.

Instead of treating the document as one large object, applications can work with individual components.

This is part of the Office Open XML and Open Packaging Conventions standards.

2. XLSX: A spreadsheet made of multiple components

An XLSX file uses a similar package structure.

Instead of containing only one spreadsheet, it can include several worksheets, styles, formulas, charts, and other information.

Some common internal components include:

Internal componentPurpose
xl/workbook.xmlWorkbook information
xl/worksheets/Individual worksheet data
xl/styles.xmlCell formatting
xl/sharedStrings.xmlShared text values
xl/media/Embedded images and other media

For example, a workbook containing three worksheets may store the information for each sheet separately.

Excel uses the package relationships to understand how all these components belong together.

This is one reason why an XLSX file is much more than a simple table of numbers.

3. EPUB: An ebook packaged as an archive

EPUB is a common format for digital books.

Unlike a simple text document, an ebook may contain:

  • Multiple chapters.
  • Images and illustrations.
  • Book metadata.
  • Navigation information.
  • Styling and formatting.
  • Fonts and other resources.

These components are organized inside an EPUB container, which uses ZIP as its packaging format.

Some important internal files include:

Internal componentPurpose
mimetypeIdentifies the EPUB media type
META-INF/container.xmlPoints to the main package document
.opf package documentContains publication information and resources
XHTML filesContain the actual book content
CSS filesControl formatting and appearance

EPUB has specific ZIP-container requirements. For example, the mimetype file must be the first file in the archive and must not be compressed.

This is why a valid EPUB is not simply an arbitrary ZIP archive containing some text files.

4. APK: An Android application packaged as an archive

An APK is the installation package used for Android applications.

It also uses ZIP as its container.

However, its contents are very different from an ordinary document.

An APK may contain:

Internal componentPurpose
AndroidManifest.xmlApplication information and declarations
classes.dexCompiled application code
resources.arscCompiled application resources
assets/Application assets
res/Application resources
META-INF/Signing-related metadata in APKs using relevant signature schemes

This structure allows Android to install and run applications using the information packaged inside the APK.

Unlike a regular document, an APK also has digital-signature requirements. Modifying the package can invalidate its existing signature.

Never install an APK just because you can open it as an archive. Its contents still need to be treated as executable application code.

How can you open these files as ZIP archives?

You can experiment with a copy of a file using an archive application such as 7-Zip.

For example:

  1. Make a copy of report.docx.
  2. Rename the copy to report.zip.
  3. Open it using an archive utility.
  4. Explore its internal folders and files.

The same basic approach can work with XLSX, EPUB, and APK.

However, this doesn't convert the original file into another format.

It only changes the filename and allows an archive application to attempt to inspect the existing package.

Also, don't modify the internal files and expect the original document or application to remain valid.

Why internal structure matters when identifying a file

This is a good example of why identifying a file isn't always as simple as reading its extension.

Several different formats can use the same underlying ZIP signature.

Looking only at the first bytes may tell you that something is ZIP-based, but inspecting the internal structure provides additional clues about whether you're looking at a Word document, spreadsheet, ebook, or Android application.

This is especially useful when a file has no extension or has been renamed incorrectly.

FileExplain helps you understand what a file actually contains and identify its real format, rather than relying only on the name.

Not sure what your file really is? Check it with FileExplain.

Frequently Asked Questions

Are DOCX and XLSX really ZIP files?

They use ZIP-based packages, but they follow additional structural rules that define how their documents, relationships, and resources are organized.

Can I open a DOCX file with 7-Zip?

Yes. A DOCX file can generally be inspected as a ZIP package using an archive utility.

Does changing DOCX to ZIP convert the document?

No. It changes the filename, not the underlying content. The package is still a Word document internally.

Are all Word documents ZIP-based?

No. Older formats such as .doc use a different binary structure. Modern .docx files use the ZIP-based Office Open XML package format.

Can I edit the contents of an APK?

You can inspect and extract its contents, but modifying an APK can invalidate its digital signature. Rebuilding and signing an application requires additional steps.

Can a ZIP archive be mistaken for DOCX or EPUB?

Yes. ZIP-based files can share the same general ZIP signature. Examining their internal contents helps distinguish them.