Docker Image Layer Visualizer
Paste docker history output to see layer sizes, a treemap and bloat hints.
Docker history output
6 lines · 560 charsLayer breakdown
4 finding(s)5 layers · 26.9MB total Base image: 24.5MB · Findings: 4 · Estimated waste: 6.1MB
Details
Built images are stacks of read-only layers, and a single careless RUN instruction can hide tens of megabytes in a package-manager cache. Paste the output of docker history --no-trunc (or --format json) to see each layer's command, size and share of the image. A rule engine flags classic bloat patterns such as unremoved apt caches, repeated COPY instructions and zero-byte metadata layers. Nothing is uploaded: parsing and rendering happen in this tab.
More examples
Uncleaned package cache
<missing> /bin/sh -c apt-get update && apt-get install -y curl 24.5MBThe layer is flagged with an estimated 20% wasted bytes because /var/lib/apt/lists is not removed in the same layer.
Duplicate COPY
COPY dir:abc in /app 1.2MB
COPY dir:abc in /app 1.2MBThe second COPY is reported as a duplicate; combine the files into one layer to avoid shipping content twice.
Base image layers
<missing> /bin/sh -c #(nop) CMD ["node"] 0B<missing> marks a layer inherited from a pulled base image; it is badged as base in the stack.
Examples
Package cache
/bin/sh -c apt-get update && apt-get install -y curl — 24.5MBapt-cache finding · estimated waste 4.9MBDeleting /var/lib/apt/lists in the same RUN instruction avoids keeping the index in the layer.
Repeated COPY
COPY dir:abc in /app — 1.2MB (twice)duplicate-copy finding on the second layerIdentical COPY destinations in separate layers ship the same content twice.
Metadata-only layer
#(nop) LABEL version=1 — 0Bmetadata-layer + zero-size findingsSuch layers are normal but can be hidden so the stack focuses on real byte usage.
Base layers
<missing> — CMD ["node"] — 0BLayer badged as baseLayers inherited from the pulled base image cannot be fixed in your own Dockerfile.
About this tool
Docker Image Layer Visualizer turns the unreadable table from docker history into a layer stack, a size treemap and a short list of bloat findings. Paste the table (or JSON from --format json) and each layer's command, size and share of the image appears immediately.
The parser understands B, kB, MB and GB sizes, joins backslash-continued commands, accepts Windows line endings and marks <missing> image IDs as inherited base layers. Lines with unknown size units are skipped and counted, so a malformed paste never silently produces a misleading total.
A small rule engine flags classic bloat: package caches left behind by apt/yum/dnf, repeated COPY commands and zero-byte metadata layers. Wasted bytes are estimates based on common patterns, not a byte-level diff of the image. All parsing happens locally; no image data is uploaded.
What this tool does not do
- Only docker history text or JSON is analyzed; the image filesystem is never inspected.
- Wasted-bytes hints are heuristic estimates, not measured deltas.
- Multi-architecture manifest images are treated as a single history; there is no per-platform split.
- Rows with size units outside B/kB/MB/GB are skipped and reported rather than guessed.
- No Docker daemon or binary is required or used.
How to use this tool
Get the history
Run docker history --no-trunc <image> and copy the whole table, or use docker history --format json for structured input.
Paste and inspect
Paste into the input pane. The stack shows each command and size as a proportional bar; the base badge marks inherited layers.
Read the findings
Switch to Findings for bloat hints and Treemap for a size-proportional view. Zero-byte layers can be hidden.
Copy the summary
Copy or download the text summary to attach it to a ticket or a build-size discussion.
Use cases
Shrinking deploy images
See which layer dominates an oversized image before rewriting a Dockerfile.
CI size regressions
Paste history from two builds and compare which layer grew.
Learning layering
Show learners how each Dockerfile instruction becomes a layer with its own size.
Ticket evidence
Copy a text summary of the stack and findings into a performance ticket.
Accepted input and units
| Input | Handling |
|---|---|
| docker history table | Columns detected from the header row; commands may span continuation lines |
| --format json | Array of objects with ID, CreatedBy, Size and Comment keys |
| Sizes | B, kB, MB and GB (powers of 1024); decimals accepted |
| <missing> IDs | Badged as base/pulled layers |
| Unknown units | Row skipped and counted in the warning banner |
| CRLF / LF | Both accepted |
The image itself is never uploaded or inspected — only the text you paste.
Common mistakes
Mistake:Expecting the tool to detect deleted files still stored in lower layers.
Fix:It only sees docker history output; use dive or image diff tools for filesystem-level analysis.
Mistake:Treating waste estimates as exact byte counts.
Fix:The heuristics flag common patterns; verify with an actual image rebuild before quoting savings.
Mistake:Pasting truncated docker history output.
Fix:Use --no-trunc so commands are complete; continuation lines with a trailing backslash are joined.
Mistake:Assuming <missing> layers are broken.
Fix:That marker means the layer came from a pulled base image, not that the image is invalid.
Mistake:Hiding zero-byte layers and thinking they were removed.
Fix:The toggle only affects the view; the underlying image is unchanged.
Frequently asked questions
How do I get the history output?
Run docker history --no-trunc <image> in a terminal and paste the whole table. For structured input, docker history --format json also works. The --no-trunc flag prevents commands from being cut off.
Why do some layers say <missing>?
Docker uses <missing> as the image ID for layers inherited from a pulled base image. The badge means base layer, not error. Those layers cannot be optimized from your own Dockerfile.
Can it detect deleted files still present in lower layers?
No. This tool sees only the command and size columns from docker history. Detecting files that still occupy lower layers requires a filesystem-level tool such as dive.
Does the image upload anywhere?
No. Parsing, analysis and rendering run in your browser tab. Nothing is sent to a server, and the pasted history is not persisted between visits.
How accurate are the wasted-bytes hints?
They are heuristic estimates: for example, roughly 20% of a layer with an uncleaned apt cache, or the full size of a duplicate COPY. Use them as pointers for investigation, then verify by rebuilding the image.
Why was a line skipped?
The parser needs a recognizable size in B, kB, MB or GB. Rows with unknown units or too few columns are skipped and counted in the warning banner so the total stays trustworthy.
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.gitattributes Generator
Build .gitattributes rules for line endings, Git LFS, GitHub linguist marks and merge drivers — with a one-line explanation for every rule.
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
A/B Test Sample Size Calculator
Compute required sample size per variant and test duration from baseline conversion rate, minimum detectable effect, alpha and power.
ABA Routing Number Validator
Validate 9-digit US ABA routing numbers with 3-7-1 Mod-10 breakdown.