What is the DBF file format?
A .dbf file contains a structured database organized in tables with records. The format originated in 1983 alongside dBASE II and became the de-facto standard of the broader xBase family of database tools. .dbf was designed to facilitate data exchange between various applications. Multiple dialect versions of the .dbf format exist - each iteration adding new data types and flags - and because of these differences, not all applications can open a given .dbf file without knowing which dialect it follows.
The .dbf file header is encoded in binary and describes the structure of the database. It holds such information as:
- A version flag byte (offset 0; e.g.
0x03= dBASE III/IV without memo,0x30= Visual FoxPro,0x83= dBASE III with companion memo), - Last database update date (bytes 1-3, stored as YY MM DD),
- Number of records - a 32-bit integer,
- Header length and record field length,
- Encryption flag,
- Field descriptor array - a table of column names, types and fixed widths.
After the header, records are saved in ASCII text or binary format with a constant field length. When a record is removed by the application, its first byte is set to an asterisk (0x2A), marking it as logically deleted rather than physically erasing it. New records are appended to the end of the file, increasing its size; some implementations later compact the file with a PACK operation and overwrite previously deleted records.
Memo data (long text, binary, or OLE objects) is not stored inside the .dbf itself - it lives in a companion file: .dbt for dBASE III/IV or .fpt for FoxPro/Visual FoxPro. The .dbf record stores only a block-number pointer to the companion. .dbf files can also be opened using dedicated DBF viewers; such tools allow users to inspect the file contents in a human-readable form. .dbf files should not be opened with a text editor, as the binary header and field data will appear as garbled characters.
Security & safety
RISK: LOWA .dbf is plain tabular data, not executable, so opening one is safe. Two practical cautions: (1) character-encoding/code-page mismatches can garble accented or non-Latin text - pick the right charset on import; (2) DBFs from accounting, tax or GIS sources can contain personal/sensitive data, so avoid uploading them to online viewers. Corrupted DBFs (missing memo file or truncated) may need a repair/recovery tool rather than a normal opener.
Format details
in a nutshellPrograms that open DBF files
Technical details
deep spec| Format category | Flat single-table binary database; fixed-length record layout with a binary header and field-descriptor array |
| MIME type | application/dbf (also application/dbase and application/x-dbf in various implementations) |
| Version identification | First byte (offset 0) is a dialect flag rather than a fixed magic number: 0x03 = dBASE III/IV without memo, 0x30 = Visual FoxPro, 0x83 = dBASE III with .dbt memo, 0xF5 = FoxPro 2.x with memo |
| Header structure | 32-byte base header + one 32-byte field descriptor per column + 0x0D terminator byte; field descriptors begin at offset 32 |
| Deletion handling | Deleted records are logically flagged by setting the record’s first byte to 0x2A (ASCII asterisk); they remain in the file until explicitly removed via a PACK operation |
| Record encoding | Fixed-length records; Character fields in ASCII, Numeric fields as zoned-decimal ASCII strings, Date as 8-byte YYYYMMDD ASCII, binary/raw bytes for other types |
| Supported field types | Character (C), Numeric (N), Date (D), Logical (L), Memo (M), Float (F); Visual FoxPro adds Currency (Y), DateTime (T), Integer (I), and General (G) for OLE objects |
| Memo companion file | .dbt for dBASE III/IV; .fpt for FoxPro and Visual FoxPro - the .dbf record stores only a 10-digit block-number pointer, not the memo data itself |
| Index companion files | .ndx (dBASE single-index), .mdx (dBASE IV multi-index), .cdx (FoxPro/VFP compound index) - all external; no index data is embedded in the .dbf |
| Maximum records | Up to 1,073,741,823 records per table (2°30 − 1) in dBASE 7; earlier dialects cap at lower counts depending on header field width |
| Maximum fields per table | 255 fields in standard xBase dialects (dBASE III through FoxPro/VFP) |
| Field name length | Up to 10 characters in dBASE III/IV and FoxPro; up to 128 characters in dBASE 7 Long Field Names mode |
| Codepage support | Codepage identifier stored at header offset 29 (0x1D); common values: 0x03 Windows ANSI, 0x57 US OEM (CP437), 0x64 Eastern European OEM (CP852) |
| Encryption flag | Header byte at offset 15 (0x0F) signals dBASE-level record encryption; if set, record data is XOR-obfuscated - distinct from any file-system-level encryption |
| GIS usage | ESRI Shapefile always ships a companion .dbf for feature attributes alongside the .shp geometry file; tools such as GDAL/ogr2ogr read and write these .dbf files natively |
| Released | 1983 (dBASE II/III); format family known as xBase |
| Open standard | Yes · royalty-free |
| Specification | www.dbase.com |
DBF conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about DBF files.