webdiskstat converts JSON from gdu -o- or ncdu -o- into a self-contained disk usage HTML report you can open in a browser. It gives scanner output a WinDirStat-style directory list, browser treemap, search, keyboard navigation, a compressed embedded payload, and optional password encryption without running a web server.
Try the live example report before generating your own.
The included example uses 83,000 generated files across 12 uneven top-level workspaces and 4 loose root files, including one workspace with 12,000 direct files, so it exercises large-directory navigation and search.
Generate a gdu report:
gdu -o- /path/to/scan | webdiskstat -o diskstats.htmlOpen diskstats.html in a browser. The report is a static HTML file, so it can be viewed offline or shared as a single artifact.
Download a release package from GitHub Releases.
Linux x86-64:
curl -L -o webdiskstat-linux-amd64.tar.gz https://github.com/rwahyudi/webdiskstat/releases/latest/download/webdiskstat-linux-amd64.tar.gz
tar -xzf webdiskstat-linux-amd64.tar.gz
install -Dm755 webdiskstat ~/.local/bin/webdiskstatWindows x86-64 PowerShell:
Invoke-WebRequest -Uri https://github.com/rwahyudi/webdiskstat/releases/latest/download/webdiskstat-windows-amd64.zip -OutFile webdiskstat-windows-amd64.zip
Expand-Archive .\webdiskstat-windows-amd64.zip -DestinationPath .
.\webdiskstat.exe --help| Area | What it does |
|---|---|
| Inputs | Reads gdu -o- JSON by default, ncdu -o- JSON with --input-type ncdu, stdin, saved JSON files, and .gz exports. |
| Output | Writes one self-contained HTML disk usage report with embedded scan data and favicon. |
| Browser UI | Provides sortable columns, configurable visible columns, nested treemap tiles, breadcrumb navigation, browser back/forward support, bookmarkable URL hashes, and a biggest-files view. |
| Scale | Virtualizes large directory listings and builds a global search index for quickly jumping to files or directories. |
| Security | Can encrypt embedded scan data with --password using PBKDF2-SHA256 and ChaCha20-Poly1305. Encrypted reports prompt for the password in the browser. |
| Offline use | Generated reports work as static files after generation without Go, gdu, ncdu, or a web server. |
Generate an ncdu web report:
ncdu -o- /path/to/scan | webdiskstat --input-type ncdu -o diskstats.htmlGenerate a disk usage HTML report from a saved scanner export:
gdu -o report.json /path/to/scan
./webdiskstat report.json -o diskstats.htmlRead a compressed scanner export:
./webdiskstat report.json.gz -o diskstats.htmlusage: webdiskstat [--input-type gdu|ncdu] [-o OUTPUT] [--password PASSWORD] [input]
input: scanner JSON file,.gzfile, or-for stdin. Defaults to stdin.--input-type: input JSON format, eithergduorncdu. Defaults togdu.-o, --output: output HTML path. Defaults towebdiskstat.html.--password PASSWORD: encrypt the embedded scan data. Defaults to unencrypted.
Running the script without piped input or an input file prints the usage instructions.
Encrypt the embedded report data with --password:
./webdiskstat report.json -o diskstats.html --password 'choose-a-strong-password'Encrypted reports use Web Crypto when available and include a JavaScript fallback for file:// and other non-HTTPS schemes. Unencrypted reports disclose the scan metadata embedded in the HTML, and encrypted reports still depend on password strength.
- The left panel lists the current directory entries, including modified time when the scan data provides it.
- Columns are sortable by name, item count, file count, size, and modified date.
- Optional columns can be shown or hidden from the column settings button next to the Name header.
- The toolbar search finds files and directories across the whole report and jumps to the selected result.
- The treemap shows the current directory, including nested subdirectories and files inside larger directory tiles when space allows.
- The home view shows a smaller treemap and a framed biggest-files list.
- Details show size, percentage, type, extension, item count, file count, and modified time when the scan data provides it.
- The Help button in the toolbar, or the
?shortcut, explains mouse actions, keyboard shortcuts, and navigation.
- Breadcrumbs, the parent button, and browser back/forward move between directories.
- Use the search box,
/, orCtrl+Fto find files and directories across the report. - Double-click a directory row or treemap tile to enter it.
- Double-click a file or biggest-files row to jump to the directory containing that file.
- The URL hash changes as you navigate, so directory views are bookmarkable.
Arrow Up/Arrow Down: move selection in the directory list.Page Up/Page Down: move selection by one visible page.Home/End: jump to the first or last item.Enter/Arrow Right: enter the selected directory.Backspace/Arrow Left: go up one directory.n/s/C/Morm: sort by name, size, file count, or modified time. Repeating the same shortcut toggles ascending or descending order.?: open the Help dialog.
The generated report embeds scan data as a compact string-table payload that is gzip-compressed before being stored in the HTML.
- Viewing generated reports requires a browser with the standard
DecompressionStreamAPI. - Encrypted reports show an encrypted data indicator in the footer and prompt for the password before loading scan data.
- Encryption uses PBKDF2-SHA256 key derivation and ChaCha20-Poly1305 payload encryption.
- Reports use the browser Web Crypto API when available and include a slower JavaScript fallback for
file://and other non-HTTPS schemes. - Unencrypted reports disclose the scan metadata embedded in the HTML.
- Command-line passwords may be visible in shell history or process lists.
- Go 1.25 or newer
git clone https://github.com/rwahyudi/webdiskstat.git
cd webdiskstat
go build -o webdiskstat .
install -Dm755 webdiskstat ~/.local/bin/webdiskstat