Skip to converter

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.

Drop files here or DBF, up to 12 MB
    Add a file to start.

    Processed on your device. Files aren’t sent anywhere.

    No sign-up. Nothing to install.

    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 fieldIn the CSVNote
    Character, width 20padded textspaces come from the declared width
    Numericthe stored numberwritten as text
    Datethe stored charactersnot a spreadsheet date
    Logicalthe stored flagread 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.

    1. Convert the .dbf file and download the CSV.
    2. Open it in a text editor so nothing is retyped.
    3. Compare the column count with the fields in the definition block.
    4. Trim padding spaces left by fixed-width character fields.
    5. Convert numeric columns to numbers before importing.

    Questions

    Where do the column names come from?
    From the field definition block at the start of the file, not from a header row inside the data.
    Why are some values padded with spaces?
    Character fields are fixed-width in dBASE, so short values arrive padded to the declared width. Trim them after extraction.
    Does a date field become a date?
    No. CSV has no date type, so the stored characters are written as text.
    Are deleted records exported?
    No. Records marked as deleted in the file are not written to the CSV.

    Share this converter

    More sharing options