What is the NDX file format?
An .ndx file is a single-field B-tree index associated with a dBASE database (.dbf). Introduced with dBASE III in 1984, it provides sorted access to records without scanning the entire table - analogous to an index in a printed book.
The format stores a B-tree of fixed 512-byte nodes. A 16-byte header records the root block number, total block count, key length, key type, and a unique-value flag. Each leaf node contains sort key values alongside record number pointers back into the .dbf file.
One .ndx file indexes exactly one key expression - a field name or simple formula, up to 220 characters, with the evaluated key capped at 100 bytes. This single-index-per-file constraint is .ndx's main limitation compared to the later .MDX format (dBASE IV, 1988), which stores up to 47 index tags in one file and updates automatically.
Critically, .ndx indexes are not automatically maintained when records are added, deleted, or modified in the .dbf. Users must issue an explicit REINDEX or SET INDEX TO command in dBASE to rebuild them - a stale index produces incorrect query results. Modern tools such as dBASE Plus and DBF Viewer Plus still accept .ndx files for legacy compatibility. FoxPro and Visual FoxPro prefer the .cdx compound index format instead.
Security & safety
RISK: LOWNDX files contain only index data (keys + record pointers); no executable code. Safe to open with any xBase-compatible viewer. Corruption of an NDX does not affect DBF data - the index can be rebuilt.
Format details
in a nutshell- FoxBase/FoxPro Index File - FoxBase and early FoxPro also used .ndx single-index files (same format as dBASE III NDX); FoxPro 2+ moved to .cdx compound index.
- Index file (generic naming) - Some custom applications use .ndx generically as a plain-text or proprietary index file unrelated to dBASE.
Programs that open NDX files
Technical details
deep spec| Format type | Binary single-field B-tree index for dBASE databases |
| Encoding | Binary, little-endian |
| B-tree node size | Fixed 512 bytes per node (root, branch, and leaf nodes) |
| Header | 16 bytes - root block number, total block count, key length, key type (character/numeric), unique flag, version byte |
| Key expression limit | Up to 220 characters in the expression; evaluated sort key value capped at 100 bytes |
| Index capacity | One key expression per file (single-index constraint - one `.ndx` file per indexed field or expression) |
| Linked database | Companion `.dbf` file; leaf nodes store record number pointers into the DBF data rows |
| Auto-update behavior | Index is NOT automatically maintained; requires explicit `REINDEX` or `SET INDEX TO` after DBF modifications |
| Origin | dBASE III by Ashton-Tate; compatible with dBASE IV, V, and modern xBase implementations |
| Superseded by | `.mdx` (dBASE IV - up to 47 auto-updated index tags per file); `.cdx` (FoxPro / Visual FoxPro) |
| Associated OS | DOS (original), Windows (legacy compatibility in modern tools) |
| Modern support | Still accepted by dBASE Plus and DBF Viewer Plus for legacy compatibility |
| Key types | Character strings and numeric values; date fields convert to character representation for indexing |
| Stale index risk | An `.ndx` not rebuilt after DBF changes returns incorrect query results without warning |
| Released | 1984 (dBASE III) |
| Latest version | dBASE III-compatible NDX (unchanged since dBASE III era) |
| Open standard | Yes · royalty-free |
| Specification | pic.hallikainen.org |
NDX conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about NDX files.