TTabulens RUPT Windows Open app

DBF structure: a format reference

The format is over forty years old, the specification has split into dialects, and there is no single standard. This page collects what you need to read a file yourself or to understand why someone else's program cannot.

Updated 2026-09-30 · format DBF

The header: first 32 bytes

OffsetSizeContents
01format version: 0x03 dBase III, 0x30 Visual FoxPro, 0x83 dBase III with memo
1–33date of last update: year (two digits), month, day
4–74number of records
8–92header length — this is where the data starts
10–112length of one record
281table flags: 0x01 has .cdx, 0x02 has memo, 0x04 belongs to a .dbc
291language driver (code page)

A useful consequence: the record count can be checked with arithmetic. (file size − header length) ÷ record length should equal the counter. If it does not, the file was truncated or the counter is lying.

Field descriptors

Right after the header come the field definitions, 32 bytes each, followed by a 0x0D byte that marks the end of the list.

Each descriptor holds: the name (11 bytes, zero-padded), the type (1 byte), the field offset (4 bytes), the length (1 byte), the number of decimal places (1 byte) and flags (1 byte). Field names are limited to ten characters for this reason.

dBase Level 7 is a special case: the name takes 32 bytes and the whole descriptor is 48. The two layouts can be told apart structurally — check which one makes the field lengths add up to the record length in the header.

Field types

TypeMeaningHow it is stored
Ccharacter stringtext, padded with spaces on the right
N, Fnumberas text, right-aligned
Ddateeight characters YYYYMMDD
Llogicalone character: T, F, Y, N or a space
Mmemoa block number in an external file
Iinteger4 bytes, little-endian
Tdate and time8 bytes: a Julian day and milliseconds
Ycurrencyan 8-byte integer, divided by 10,000
Bdouble in Visual FoxPro, memo in dBasedepends on the version — a frequent source of errors

Numbers stored as text are not an archaism but a feature: N(12,2) holds exactly what you see, with no binary rounding. That is why totals in a DBF do not “drift” the way they do in floating-point formats.

Records and the deletion flag

Records follow one another, all of the same length. The address of any record is a multiplication away, so access to a record is instant.

The first byte of every record is a service byte: a space means the record is active, an asterisk means it is flagged as deleted. More on this in its own article.

Visual FoxPro adds a system field, _NullFlags: a bit mask in which each bit says that the corresponding field holds NULL. Without parsing it, empty values look like zeros and empty strings — and the difference matters.

FAQ

Why is the same type read differently by different tools?

Because of dialects. The classic example is type B: in Visual FoxPro it is a double-precision number, in dBase a reference to a binary memo.

How do I find out the format version?

From the first byte of the file. But the version only names the dialect: whether memo is present is better judged from the actual field types.

What is the .cdx file next to the table for?

It is an index for fast lookup and sorting. Its data duplicates the table, so after editing the table without the index it has to be rebuilt.

Your file never leaves your computer. Parsing happens in the browser, in a background thread. The page's security policy forbids sending data to third-party addresses — you can check this in the developer tools. After the first visit the app keeps working offline.
Open the app Download for Windows

Free for personal use. Your file is not uploaded to a server. Windows version — 3.5 MB, no installation: details. Organizations: license.