DBF to CSV — records plus a field header, and what that header can tell you
A .dbf file is not a spreadsheet and not a text file: it is a binary table of records with a header that defines every field — name, type, width. That header is what makes the extraction possible, and it is also the thing that cannot be expressed in CSV.
Cell formatting, colours, column widths and merged ranges are dropped; only stored values survive.
Processed on your device. Files aren’t sent anywhere.
A dBASE file is records plus a field header
The file opens with a definition block naming each field and declaring how it is stored, followed by one fixed-length record per row.
- Field names come from the definition block, not from a header row.
- Each record is fixed-length, so fields are read by position and width.
- Character fields are padded to their declared width.
- Deleted records are not exported.
- The file is read as bytes, not decoded as text.
Fields become columns
The definition block becomes the header row, and each record becomes a CSV row in field order.
| Declared field | In the CSV | Note |
|---|---|---|
| Character, width 20 | padded text | spaces come from the declared width |
| Numeric | the stored number | written as text |
| Date | the stored characters | not a spreadsheet date |
| Logical | the stored flag | read as text |
Read as bytes, not as text
A dBASE file is binary, so the reader parses the structure rather than decoding the whole file as characters. Values are then written as UTF-8 text. Legacy files were written under a single-byte codepage, so accented attribute values can arrive changed.
The attribute table does not become a map
A DBF can arrive as one member of a geographic dataset, but this page receives and reads one table file. It does not combine companion files or rebuild map geometry. Treat the CSV as a table handoff: field names and values are useful on their own, while relationships to other parts of the dataset may require a separate workflow.
If you need to join the extracted rows back to another dataset, identify the join field before editing column names or sorting records. Check a few known records at both ends of the join. Row position is a fragile substitute for a stable identifier, particularly after someone filters or reorders the CSV.
What the CSV does not keep
The header carries information a delimited file cannot express.
Field types, declared widths and index metadata describe how the data was stored. CSV stores rows and nothing else.
Why a dBASE attribute table loses its schema on export
Checking the extracted rows
The output is UTF-8 with a byte order mark and CRLF line endings.
- Convert the .dbf file and download the CSV.
- Open it in a text editor so nothing is retyped.
- Compare the column count with the fields in the definition block.
- Trim padding spaces left by fixed-width character fields.
- Convert numeric columns to numbers before importing.