MacDirStat is a free, open-source disk space analyzer for macOS. It scans your Mac and draws every file as a color-coded treemap, so you can see what's taking up space and free up storage.
It's a native Mac app inspired by WinDirStat on Windows, with no ads, subscriptions, accounts, or tracking.
Download MacDirStat (.zip) · Free · macOS 15 Sequoia or later · Apple silicon and Intel · Notarized by Apple · All releases
Each rectangle is a file. Its area is how much space it uses, its color is its file type, and files are grouped inside their folders.
- Download MacDirStat.zip.
- Unzip it. Safari unzips downloads automatically. With another browser, double-click
MacDirStat.zipin your Downloads folder. - Drag
MacDirStat.appinto your Applications folder. - Open MacDirStat. macOS asks you to confirm opening an app downloaded from the internet. Click Open. MacDirStat is signed with an Apple Developer ID and notarized by Apple, so no Gatekeeper workarounds are needed.
MacDirStat runs without special permissions, but macOS stops apps from reading some protected folders, such as Mail, Messages, and other apps' data. When Full Disk Access is off, MacDirStat's start screen shows a banner that takes you to the right setting. To include those folders in scans:
- Click Open System Settings in the banner, or open System Settings → Privacy & Security → Full Disk Access yourself.
- Turn on MacDirStat. If it isn't listed, click + and choose it from your Applications folder.
- Click Relaunch in the banner, or quit and reopen MacDirStat.
You only need to do this once: the permission carries over when you update to a newer download. Without Full Disk Access, macOS may ask during a scan whether MacDirStat can access folders like Desktop, Documents, or Downloads. Click Allow so they're measured.
MacDirStat never connects to the internet, so it doesn't check for updates itself. To update, download the latest zip and replace the app in Applications. To be notified of new versions, click Watch → Custom → Releases at the top of this page (requires a GitHub account).
To uninstall, quit MacDirStat and drag it from Applications to the Trash. It doesn't install background services or helper tools.
- Open MacDirStat. The start screen lists your drives, with a bar showing how full each one is.
- Pick what to scan. Click your startup disk (usually Macintosh HD) to scan the whole Mac, click an external drive, or click Choose a Custom Folder... to scan a single folder.
- Wait for the scan. MacDirStat shows the number of files and the total size found so far. You can cancel at any time.
- Look for the biggest rectangles. They are the files using the most space. Hover over any rectangle to see its full path and size in the status bar at the bottom.
- Zoom in on crowded areas with the scroll wheel, a trackpad pinch, or the zoom buttons in the toolbar.
- Drill into a folder. Double-click any rectangle to show just the folder it's in. The breadcrumb bar above the treemap, or the Back button, takes you back up.
- Check folder totals. The sidebar lists folders sorted largest first. Select a folder to see its size, file count, and breakdown by file type in the inspector on the right, or click a file in the treemap to see its details.
- Act on what you find. Right-click a file and choose Reveal in Finder, then delete it in Finder if you're sure you don't need it. Click Rescan in the toolbar to refresh the treemap.
MacDirStat never deletes or moves files itself.
- Interactive treemap. Every file is drawn as a rectangle sized by its disk usage, nested inside its folders, using the squarified treemap layout. Large files and folders stand out at a glance, and bigger rectangles are labeled with their name and size.
- Color-coded file types. Files are colored by category: documents, images, video, audio, code, archives, applications, system, caches, and other.
- Folder tree sidebar. Browse the folder hierarchy, sorted largest first, with each folder's size.
- Inspector panel. Shows size, allocated size, file and folder counts, last-modified date, and a bar chart of what each folder contains by file type.
- Drill down. Double-click a rectangle to focus the treemap on its folder, then go back up with the breadcrumb bar or the Back button.
- Zoom and pan. Zoom with the scroll wheel, a trackpad pinch, or the toolbar. Pan by dragging with the middle mouse button.
- File Size or Allocated Size. Switch between each file's content size and the space it actually takes up on disk.
- Drive overview. The start screen shows your mounted drives with their used and available space, or you can scan any folder.
- Reveal in Finder and Copy Path from the inspector or the right-click menu.
- Parallel scanning with live progress. MacDirStat reads the file system with low-level POSIX calls and scans folders in parallel. Hard-linked files are counted once.
- Native and lightweight. Built with SwiftUI, with no external dependencies, no Electron, and no bundled runtimes.
- Private by design. The app has no networking code: no analytics, no crash reporting, no update checks. Your file list never leaves your Mac.
WinDirStat itself is Windows-only, but MacDirStat is a free, open-source macOS app inspired by it. It scans a drive or folder and shows disk usage as a color-coded treemap next to a folder tree. MacDirStat is an independent project and isn't affiliated with WinDirStat.
Yes. MacDirStat is a free, open-source disk space analyzer for macOS that shows disk usage as a treemap, and the MIT License allows both personal and commercial use. WizTree itself is also available for macOS as WizTreeMac.
Open MacDirStat, click your startup disk (usually Macintosh HD), and wait for the scan to finish: the largest rectangles in the treemap are the files using the most space. Hover over a rectangle to see its path, then right-click and choose Reveal in Finder to deal with it. macOS also has a built-in overview under System Settings → General → Storage, but it sorts usage into broad categories such as Applications, Documents, and System Data rather than showing your whole folder structure. See How to see what's taking up space on your Mac for step-by-step instructions.
Yes. MacDirStat is free and open source under the MIT License, with no ads, in-app purchases, subscriptions, or sign-up. That makes it a free alternative to commercial Mac disk analyzers such as DaisyDisk.
MacDirStat is read-only and works entirely offline: the app contains no networking code, so it can't send your file names or any other data off your Mac. It reads file information such as names, sizes, and dates, not file contents, and it never modifies, moves, or deletes files. Downloads are signed with an Apple Developer ID and notarized by Apple, and the full source code is in this repository for anyone to review.
No. MacDirStat is read-only. To remove something you find, right-click it, choose Reveal in Finder, and move it to the Trash in Finder. Then click Rescan to update the treemap.
Yes. MacDirStat is a universal app that runs natively on both Apple silicon (M-series) and Intel Macs, as long as the Mac runs macOS 15 Sequoia or later.
MacDirStat requires macOS 15 Sequoia or later. It doesn't run on macOS 14 Sonoma or earlier.
MacDirStat doesn't need Full Disk Access to run; the permission only lets it measure folders that macOS protects, such as Mail, Messages, and other apps' data. Without it, those folders are counted as empty, so totals can come out lower than the space actually in use. MacDirStat only reads file information and has no networking code, so granting access doesn't send anything anywhere. See Optional: allow Full Disk Access.
MacDirStat adds up the files it can read, which can differ from the numbers macOS shows:
- Protected folders are counted as empty unless you grant Full Disk Access.
- APFS snapshots, including local Time Machine snapshots, take up space but aren't regular files, so a file scan can't see them.
- Hard-linked files are counted once, and symbolic links aren't followed.
- A scan stays on one volume: other drives or volumes mounted inside the scanned folder aren't included.
- File Size and Allocated Size can differ a lot (see the next question).
File Size is the size of a file's contents; Allocated Size is the disk space the file actually occupies. Allocated Size can be smaller for compressed or sparse files, such as some virtual machine disk images, and is often slightly larger for small files, because disk space is allocated in whole blocks. Switch between them with the toggle in the toolbar.
Colors show file type, based on the file extension. Rectangles get slightly darker the deeper they're nested.
| Color | Category | Examples |
|---|---|---|
| Blue | Documents | PDF, Word, Excel, Pages, TXT, Markdown |
| Green | Images | JPEG, PNG, HEIC, camera RAW, PSD, SVG |
| Red | Video | MP4, MOV, MKV, AVI |
| Orange | Audio | MP3, WAV, FLAC, M4A |
| Purple | Code | Swift, Python, JavaScript, HTML, JSON |
| Teal | Archives | ZIP, DMG, ISO, PKG, TAR |
| Pink | Applications | DYLIB, SO, DLL, EXE, APK |
| Light gray | System | PLIST, STRINGS, .DS_Store |
| Brown | Caches | CACHE, TMP, O, PYC, CLASS |
| Gray | Other | Everything else, including files without an extension |
Yes. Mounted drives, including external ones, appear on the start screen with their used and available space. Click one to scan it, or choose any folder on it with Choose a Custom Folder....
- WinDirStat: the original Windows disk usage analyzer that inspired MacDirStat
- WizTree: disk space analyzer for Windows, now also available for macOS
- GrandPerspective: treemap disk usage visualizer for macOS
- DaisyDisk: commercial disk analyzer for macOS
- OmniDiskSweeper: macOS utility from The Omni Group that lists files from largest to smallest
You only need this if you want to work on MacDirStat; most people should use the download instead. Building requires macOS 15 or later and Swift 6 (Xcode 16 or later).
git clone https://github.com/phalladar/MacDirStat.git
cd MacDirStat
swift build -c release
swift run MacDirStatTo install it as a regular app in /Applications:
./scripts/build-app.sh
cp -R .build/MacDirStat.app /Applications/The comments at the top of scripts/build-app.sh cover universal builds and Developer ID signing.
To include protected folders (Mail, Messages, other apps' data) in scans, add MacDirStat under System Settings → Privacy & Security → Full Disk Access. The script signs the app ad hoc, so macOS treats each rebuild as a new app: after rebuilding, remove MacDirStat from that list and add it again.
Or open in Xcode:
open Package.swiftZero external dependencies. Pure Swift Package Manager project.
MacDirStat is a SwiftUI app written in Swift 6 with strict concurrency checking. A single @Observable AppState drives all views.
Scan pipeline: the user picks a drive or folder → ScanCoordinator starts FileScanner → FileScanner walks the tree with opendir/readdir/fstatat, scanning subdirectories in parallel with a task group, skipping symlinks and other volumes, and deduplicating inodes so hard links and firmlinks are counted once → it builds the FileNode tree and streams progress as ScanEvents over an AsyncStream → ScanCoordinator throttles UI updates to every 50 ms → TreemapLayoutEngine lays out the tree with the squarify algorithm on a background task → a SwiftUI Canvas renders it.
Sources/MacDirStat/
├── App/ # Entry point, AppState
├── Scanning/ # FileScanner (parallel POSIX traversal), ScanCoordinator, FileNode tree model
├── Categorization/ # FileCategory definitions, ~190 file extension mappings
├── Treemap/ # Squarify layout engine, hit testing, Canvas renderer, zoom and pan
├── Views/ # ContentView, WelcomeView, ScanProgressView, DirectoryTreeView, DetailPanelView
└── Utilities/ # ByteFormatter, FullDiskAccess, FolderPicker
Contributions are welcome. Open an issue to report a bug or suggest a feature, or submit a pull request. CI builds every pull request with swift build.
MacDirStat is released under the MIT License.
