Preview Jupyter Notebooks on Mac Without Running Them
A notebook arrives in a pull request, an experiment folder, or a Slack attachment. You need to preview Jupyter notebooks before deciding whether to run them. Starting Jupyter just to inspect a file is slow, can select the wrong environment, and may execute code you did not mean to trust.
A useful preview answers the immediate questions: what does this notebook contain, what did it produce last time, and is it worth opening in an editor or running locally? On macOS, that should be possible from Finder, without a Python kernel, a browser tab, or a project setup.
What a Jupyter notebook preview should show
A .ipynb file is JSON. Its practical contents are more useful than its file format: Markdown documentation, code cells, saved outputs, attachments, cell order, and notebook metadata. A preview should render those parts in the order a reader sees them.
Markdown matters because notebooks often hold the experiment's assumptions, data source, and interpretation between code cells. Code matters because you need to see imports, paths, environment variables, and calls that may have side effects. Saved output matters because it can show the result without requiring the data, packages, or compute used to create it.
That last point has a limit. A preview shows stored output, not fresh output. If a cell says it trained a model for three hours, the preview can show the recorded metrics and chart. It cannot tell you whether the notebook still runs, whether its dependencies resolve, or whether its result can be reproduced.
Preview Jupyter notebooks before you open them
Finder is often the first place you encounter a notebook. Quick Look is therefore the right interaction for a first inspection: select the file and press Space. You should get a readable document rather than a JSON blob or a prompt to choose an application.
For a notebook you only need to inspect, do not start a kernel. A renderer can read the notebook structure directly and display Markdown, syntax-highlighted source, tables, images, and text output from the file. This keeps the operation read-only. It also avoids a common failure mode: opening a notebook in an environment that has a similarly named package but not the project’s actual dependency set.
WizLook provides Quick Look previews and a read-only viewer for Jupyter notebooks on macOS. It reads the file on your disk. It does not need a Jupyter server, an account, or a kernel to display saved notebook content.
The same approach is useful when reviewing a notebook from a branch you did not author. You can inspect the changed file, understand the broad shape of the analysis, and decide whether it belongs in code review, data review, or a reproducibility check. The preview is not a substitute for those checks. It reduces the number of files you must fully open to find the ones that need them.
Check the execution state, not just the source
Code cells carry execution counts when they have been run. Those counts are clues, not proof. A sequence such as 1, 2, 8, 9 indicates that cells may have been rerun or skipped. An output can also be older than the source cell above it.
When you preview a notebook, compare a few things directly. Does the Markdown describe the data and result shown below it? Do imports point to a local module or a remote service? Are there hard-coded paths, tokens, or customer identifiers? Does a plot have labels, units, and a date? These checks take less time than reproducing the notebook, and they often reveal whether reproduction is necessary.
Notebook metadata can also explain why a file behaves differently on another machine. Kernel names, language versions, and widget settings are often stored there. A preview may expose enough context to tell you that the notebook expects Python 3.12, a particular conda environment, or a kernel that does not exist on your Mac.
What stays static in a notebook preview
A preview is deliberately not an execution environment. That distinction is useful for safety and speed, but it creates boundaries.
Interactive widgets are the clearest example. A notebook may contain sliders, maps, or custom JavaScript controls. The file can store a representation of their last state, but a static viewer cannot promise that every interaction will work. Open the notebook in Jupyter or another supported editor when the behavior of the widget itself is the subject of review.
HTML output has similar trade-offs. A renderer can display common saved HTML, images, and tables, but embedded scripts are not the same as a live browser session. Treat a preview as a document reader. Do not treat it as evidence that embedded application code is safe or functional.
Large outputs also deserve restraint. A cell may store thousands of rows, a long log, or a high-resolution image. Reading all of that in a file preview is rarely productive. First use the notebook’s headings, cell boundaries, and output summaries to find the relevant area. Then open the file in a notebook tool if you need filtering, re-execution, or full output inspection.
A practical review path for shared notebooks
The right workflow depends on why the notebook reached you. For an analysis you are asked to approve, inspect the narrative and saved outputs first, then verify the environment and rerun only the critical cells. For an unfamiliar attachment, inspect it without execution and look for external data access, credentials, shell commands, and opaque serialized objects before opening it in a trusted environment.
For a repository, keep notebooks alongside the code and data definitions they depend on. A preview makes the file readable in Finder, but it cannot replace version control discipline. Clear cell order, documented inputs, fixed dependency files, and removed transient outputs make notebooks easier to inspect in every tool.
If the notebook is part of a pull request, ask a narrower question than “does it work?” Ask what changed in the analysis and whether the stored output supports the claim. A chart that changes after a preprocessing edit needs scrutiny even if every cell currently runs. Conversely, a notebook with unchanged analysis but refreshed output may only need a data provenance check.
When a full notebook environment is still required
Open a full environment when you need to run cells, inspect variables, change parameters, use widgets, or confirm reproducibility. You also need it when outputs are absent. Many teams strip outputs before committing notebooks to keep diffs smaller. In that case, a preview still helps you read the source and documentation, but it cannot show results that were not saved.
Use an isolated environment for notebooks from outside your team. Review the code before execution, avoid giving the kernel credentials it does not need, and be cautious with files that load pickles or invoke shell commands. The .ipynb extension tells you the container format, not the intent of the code inside it.
A quick preview is most valuable when it stays a quick preview. Read the notebook as a document first. Run it only when the question requires live code, live data, or a result you can verify.