Flatten ZIP
Collapse all files in a ZIP archive to the top level — strips every directory layer. Useful when an export gave you `vendor/long/path/file.txt` and you just want `file.txt`. Configurable collision handling. Runs in your browser.
About Flatten ZIP
Flatten ZIP collapses every file in an archive to the top level, stripping away all the directory layers. It's the fix for the common annoyance where an export buries `vendor/long/path/file.txt` deep in folders when you just want `file.txt` at the root. Collision handling is configurable for when two files share a name, and the whole thing runs in your browser with nothing uploaded.
- Category
- archive
- Input
- Accepts: application/zip or application/x-zip-compressed.
- Output
- Outputs: application/zip.
- Cost
- Free, runs in your browser
- Memory
- medium
Common uses
- Pull every asset out of a deeply-nested CMS or theme export into one flat folder
- Flatten a photo archive that buried each image in date-based subfolders
- Strip the wrapper directory a tool added so files unzip straight into the current folder
- Consolidate scattered documents from a multi-level export into a single level for bulk processing
- Rename colliding files automatically when flattening folders that each contained an `index.html`
- Simplify a sample-data archive so every file sits at the root for quick access
Frequently asked questions
What input does it take?
A ZIP archive (application/zip or application/x-zip-compressed). It returns a new ZIP with every file moved to the top level.
What happens when two files end up with the same name?
Collision handling is configurable, so files that would clash after flattening can be renamed instead of overwriting one another.
Does flattening upload my archive?
No. The archive is unpacked, restructured, and repacked locally in your browser, so its contents stay on your device.
Is my original archive modified?
No. You get a new flattened archive; the source file is unchanged.
Will it keep my files' contents intact?
Yes. Only the paths change; the file contents themselves are copied across unchanged.
Keywords
- zip
- flatten
- directories
- folders
- collapse
- rename
- archive