.NB

NB File

Wolfram Mathematica Notebook
Ask a question
QUICK ANSWER

An NB file is a Wolfram Mathematica notebook - a document that mixes code, results, equations, and graphics in cells. To open one, use Wolfram Mathematica (paid) or the free Wolfram Player. Evaluating code inside an untrusted notebook carries some risk, but viewing it in Wolfram Player is safe.

Developer: Wolfram Research Category: Developer Files MIME: application/vnd.wolfram.mathematica
OPENS ON Windows macOS Linux Web
Related: .DO · .MD · .HEX · .XSD

On this page

19k+ extensions indexed
Last reviewed Jun 29, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the NB file format?

.nb is a file format associated with Mathematica software developed by Wolfram Research. Rather than a simple output file, a .nb notebook is a live computational document that mixes executable code, formatted results, typeset mathematics, and rich media in a single file. .nb files can contain images, audio data, mathematical functions, or references to external resources. .nb files store information in plain text as a top-level Notebook[] Wolfram Language expression, with content organized into nested Cell[] objects - input cells, output cells, text cells, and section headings. .nb data can be accessed interactively using the Mathematica notebook viewer; that data can be edited and manipulated.

Mathematica can be used to perform advanced mathematical computations. It supports such data as images, graphs, or audio data. Mathematica can generate such structures as fractals based on equations, or calculate audio signal correlations. .nb notebooks can be exported to other formats, including PDF, HTML, LaTeX, and CDF. DefaultStyles.nb is a built-in notebook that defines the default cell styles applied to new notebooks; it ships with Mathematica as a style template rather than as the format specification itself. Related Wolfram text-based formats include .wl for pure Wolfram Language scripts and .m for legacy package files.

Security & safety

RISK: MEDIUM

A notebook can contain executable Wolfram Language code, and evaluating cells can run arbitrary operations (file access, network, system calls). Opening an .nb to VIEW it (especially in Wolfram Player) is safe; the risk is RUNNING code from an untrusted notebook. Treat an unfamiliar .nb like a script: read the input cells before evaluating, and don't blindly Shift+Enter through a notebook from an unknown source. The plain-text format makes inspection easy.

Format details

in a nutshell
FULL NAMEWolfram Mathematica Notebookaka Mathematica notebook, Wolfram Notebook
DEVELOPERWolfram Researchsince 1988 (Mathematica 1.0)
MIME TYPEapplication/vnd.wolfram.mathematica
TYPEStructured text document (Wolfram Language expressions)

Programs that open NB files

Windows3 apps
Wolfram Mathematica Paid File > Open the .nb to view, edit, and evaluate cells (Shift+Enter runs a cell). The native, full-featured app.
Wolfram Player Free Open the .nb to read and interact with it for free (view results, manipulate Manipulate[] controls); you cannot edit/run arbitrary new code.
Text editor (Notepad++) Open-source Opens the raw Notebook[{Cell[...]}] source as text - useful to inspect, not to render the formatted document.
macOS2 apps
Wolfram Mathematica Paid File > Open to view, edit, and evaluate the notebook.
Wolfram Player Free Open the .nb to read and interact with it without a Mathematica license.
Linux3 apps
Text editor Open-source View the plain-text Wolfram Language source of the .nb.
Wolfram Mathematica Paid Open the .nb in the Linux build to view, edit, and run it.
Wolfram Player Free Free read/interact access to notebooks on Linux.
Web1 app
Wolfram Cloud Freemium Upload and open the notebook in the browser to view and (with an account) run it - no local install.

Technical details

deep spec
MIME typeapplication/vnd.wolfram.mathematica (also application/mathematica for older files)
Text encodingUTF-8; legacy files use ASCII with \[Name] escape sequences for Unicode and special characters
File structureSingle top-level Notebook[] expression containing an ordered list of Cell[] objects, each tagged with a style name such as Input, Output, Text, Title, or Section
CompressionNone at file level; embedded raster images and large graphics are stored as base64 or PackedArray data inside cell expressions
Cell typesInput (code), Output (cached results), Text, Title, Chapter, Section, Subsection, Print, Message - organized into collapsible CellGroup[] sections
Typical file size10 KB to several MB; size grows significantly when notebooks cache output graphics or embed high-resolution images
Live interactivityCode cells evaluate against a running Wolfram kernel; output is cached in Output cells and remains visible without a kernel for static reading
Notebook lockingOptional player-locked variant (.nbp) created via Encode[]; restricts editing while allowing Wolfram Player to execute the notebook
Platform supportWindows, macOS, Linux via Wolfram Mathematica (full authoring) and Wolfram Player (free, run-only); also available via Wolfram Cloud in a browser
Evaluation languageWolfram Language (formerly Mathematica Language); all code cells are Wolfram Language expressions evaluated by a connected kernel
Export formatsPDF, HTML, TeX/LaTeX, CDF, PNG, SVG, EPS, Markdown, and plain text via Export[] or File > Save As
Version compatibilityForward- and backward-compatible across Mathematica versions; format version is declared in the file header and newer constructs are feature-gated
File identificationNo binary magic bytes; identified by the plain-text header comment (* Content-type: application/vnd.wolfram.mathematica *) on the first line
Related formats.wl and .wls (Wolfram Language scripts), .cdf (Computable Document Format), .m (legacy package), .mx (binary serialized expression dump)
Released1988 (Mathematica 1.0)
Latest versionWolfram Notebook format tracks the app (Mathematica 14.x / Wolfram Language 14, 2024-2025)
Specificationreference.wolfram.com

NB conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with NB files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about NB files.

Frequently asked questions

How do I open an NB file without Mathematica?
Use the free Wolfram Player to read and interact with the notebook (view results, use Manipulate sliders). You can't edit or run new code without Mathematica, but you can see everything. Wolfram Cloud also opens notebooks in a browser.
What program opens a .nb file?
Wolfram Mathematica (full editing and computation) or the free Wolfram Player (view/interact). A text editor shows the raw source but won't render the formatted document.
Is an NB file a spreadsheet?
No - that's a database mislabel. An .nb is a Wolfram Mathematica notebook: a computational document of code, results, text, and graphics, not a spreadsheet.
How do I convert a Mathematica notebook to PDF?
Open it in Mathematica or Wolfram Player and use File > Save As / Export > PDF (or Print to PDF). This gives a static, shareable copy of the rendered notebook.
Why is my .nb full of Notebook[ Cell[...] ] text?
That's the notebook's source - an .nb is stored as plain Wolfram Language text. Open it in Mathematica or Wolfram Player to see it rendered with formatted math and graphics.
What's the difference between .nb and .cdf?
An .nb is the editable Mathematica notebook; a .cdf (Computable Document Format) is a deployment version that the free Wolfram Player can run interactively. You author in .nb and export to .cdf to share.

References

1Wolfram - The Structure of Notebooksreference.wolfram.com
2Wolfram Player - official pagewww.wolfram.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.BINCD/DVD Disc Image (BIN/CUE)
3.CRDOWNLOADChrome Partial Download File
4.PARTPartial Download File
5.RPMSGRestricted Permission Message
6.MDMarkdown Document
7.NOMEDIAAndroid No-Media Marker File
8.PRDXSoftMaker Presentations Document
9.PRO6XProPresenter 6 Bundle File
10.SWFSmall Web Format (Shockwave Flash)

Related extensions

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z