What is the NDF file format?
.ndf is a secondary data file used by Microsoft SQL Server to store relational database content. It extends a database beyond its primary .mdf file, typically to spread data across multiple physical disks for improved I/O throughput or to exceed single-file size limits. A database may have zero or many .ndf files; they are always optional.
Internally, .ndf files use the identical 8 KB page-based binary format as .mdf primary files. Each page is numbered and classified by type: data pages hold table rows, index pages hold B-tree index structures, and allocation pages (PFS, GAM, SGAM) track free space. Pages are grouped into 64 KB extents of 8 contiguous pages. Optional page-level compression (row or page compression, SQL Server 2008+) and Transparent Data Encryption (TDE, AES-128/256) apply to .ndf files identically to .mdf.
An .ndf file cannot be opened or recovered in isolation - SQL Server must attach it together with the primary .mdf and the transaction log .ldf as a complete database unit. The maximum file size is 16 TB on SQL Server 2016 and later.
The format was formalised with SQL Server 7.0 (1998), and the internal page format has remained essentially unchanged since then. SQL Server 2017 extended support to Linux and container environments using the same file format.
Security & safety
RISK: LOWSQL Server data files are passive binary data stores. The risk is data confidentiality - NDF files may contain sensitive database content. If found unexpectedly on a system, verify the source database before sharing. TDE-encrypted NDF files require the encryption key to access.
Format details
in a nutshell- Navision Database File (older Microsoft Dynamics NAV) - .ndf was used as the native database file extension in older Microsoft Navision/Dynamics NAV installations before migration to SQL Server.
Programs that open NDF files
Technical details
deep spec| Developer | Microsoft Corporation |
| Encoding | Binary (little-endian) |
| Page size | 8 KB (8,192 bytes) per page - identical internal format to MDF primary files |
| Extent size | 64 KB (8 contiguous 8 KB pages) |
| Page types | Data, index, LOB/text, PFS, GAM, SGAM, IAM, and file header pages |
| Compression | Optional - row or page compression (SQL Server 2008+, Enterprise and Developer editions) |
| Encryption | Optional - Transparent Data Encryption (TDE), AES-128 or AES-256 (SQL Server 2008+) |
| Page integrity | PAGE_VERIFY CHECKSUM by default since SQL Server 2005; stored in 96-byte page header |
| Maximum file size | 16 TB (SQL Server 2016+) |
| Default autogrowth increment | 64 MB per event (SQL Server 2012+) |
| Platform | Windows; Linux (SQL Server 2017+); Docker and container environments |
| Dependency | Cannot be opened alone - must be attached with .mdf primary file and .ldf log file |
| Introduced | SQL Server 7.0 (1998) - secondary data file convention formalised at this version |
| Released | SQL Server 7.0 (1998) - NDF extension formalised; data page format consistent since SQL Server 7 |
| Latest version | SQL Server 2022 (v16); page format essentially unchanged since SQL Server 7 |
| Specification | learn.microsoft.com |
NDF conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about NDF files.