Notebook compressor: shrink a Jupyter notebook so Git, email, and reviewers stop complaining
This notebook compressor shrinks bloated .ipynb files in the browser. Drop the file, choose how aggressive you want to be, and download a smaller notebook ready for Git, email, or your code reviewer. By default it strips heavy outputs (especially base64 image plots), clears `In [n]` execution counts, drops transient widget metadata, trims trailing whitespace, and minifies the JSON—steps that often cut the file size by an order of magnitude without touching a single line of your actual code or markdown.
Why does it matter? Because notebooks balloon for boring reasons. A single matplotlib plot embedded as base64 PNG can add 1–2 MB to the file. Bokeh, Plotly, and ipywidgets store their state in `metadata.widgets`, which can dwarf the cells themselves. Git diffs become unreadable. Pull requests bloat. Email attachments hit limits. The compressor removes all of those without changing the meaning of the notebook.
Compared to running `jupyter nbconvert --ClearOutputPreprocessor.enabled=True` or installing nbstripout, this page wins when you do not want to set up tooling, when the file is on a Chromebook, or when you want a quick one-off cleanup before sharing. It also goes further than nbstripout: it can drop transient widget state, replace huge image outputs with text placeholders, trim whitespace, and minify the JSON. nbstripout remains the right answer for an automated pre-commit hook; this tool is the right answer for a single notebook on someone else's machine.
Worried about losing data? The defaults are safe: outputs are removed but every cell of source stays exactly as you wrote it, every markdown cell stays in place, and the kernel + language metadata stays valid. Loosen or tighten the toggles to match the situation—keep image outputs but trim whitespace, or strip everything for the smallest possible file.

