Notebook repair tool: fix a corrupt or unreadable .ipynb file in your browser
This notebook repair tool rescues .ipynb files that Jupyter, Colab, or VS Code refuse to open. Drop the broken file in the browser, and the repair routine puts back the missing nbformat fields, regenerates cell IDs that nbformat 4.5+ requires, restores empty metadata blocks, strips Git conflict markers, and re-emits a valid notebook you can finally launch. The whole repair runs locally—no upload, no account—so even sensitive teaching, research, or client notebooks stay on your machine.
The most common breakages come from places you have probably already met: a half-written file from a crash, a notebook that lost its `cells` array after a manual edit, a Git merge that left `<<<<<<<` markers inside the JSON, a cell that lost its `id`, a kernel field that disappeared, or a code cell with no `outputs` array because someone tried to clean the file by hand. The repair function detects these patterns and quietly fixes them, while showing you a list of every change so you can audit what happened.
Compared to writing a small Python script with `nbformat.read` and `nbformat.write`, this page wins on speed: you do not need a Python environment, jupyter installed, or admin rights on the machine. Compared to opening the JSON in a text editor and guessing, this page is safer—the repair logic understands the schema, regenerates IDs without reusing them, and never silently drops cells. If the input is too far gone to parse even after stripping conflict markers, the tool reports the problem clearly instead of writing a corrupt file.
Toggle Generate stable cell IDs when working with nbformat 4.5+ (the default and recommended). Toggle Trim trailing whitespace to clean up cells edited in editors that left tab-stops behind. Toggle Drop empty cells when you want to slim the notebook at the same time as repairing it. Toggle Renumber executions when you also want a tidy execution order. The output is a normal .ipynb you can open immediately in Jupyter, JupyterLab, VS Code, Colab, or any other notebook editor.

