Skip to content
← Developer Tools
🔒All processing in your browser 🚫No uploads stored 🛡️Privacy-first conversion tools No login required

CSV to DBF Converter

Feeding data into a dBase, Visual FoxPro, Clipper, or legacy GIS application that only accepts .dbf files? This tool converts any standard .csv into a valid dBase III+ binary — field types inferred, column names sanitized — entirely in your browser with no upload and no server involved.

CSV Input File
📊
Drop a .csv file here, or Supports .csv files up to 200 MB
Wrong file type — only .csv files are supported. You dropped a file.
Errors
Warnings
    ✓ Conversion Complete
    Generated DBF Field Descriptors

    Common Use Cases

    Example Conversion

    Input: inventory.csv — 1,240 rows, 7 columns: ItemCode, Description, Quantity, UnitPrice, Warehouse, LastUpdated, Active.

    CSV (first two rows)
    ItemCode,Description,Quantity,UnitPrice,Warehouse,LastUpdated,Active
    A10042,Left-hand mounting bracket,84,12.50,WH-NORTH,2024-03-15,Y
    A10043,Right-hand mounting bracket,76,12.50,WH-NORTH,2024-03-15,Y

    Output: inventory.dbf — 1,240 records in dBase III+ binary. The generated field descriptors look like this:

    DBF field map
    ITEMCODE C(8)
    DESCRIPTIO C(30) ← truncated from "Description"
    QUANTITY N(3)
    UNITPRICE N(5,2)
    WAREHOUSE C(8)
    LASTUPDATED C(10) → LASTUPDATE C(10) ← truncated
    ACTIVE C(1)

    The most likely confusion point here is fixed-width padding: DBF does not support variable-length character fields. If your Description column has one value that is 30 characters long, every record's DESCRIPTIO field occupies exactly 30 bytes — even the three-word entries. This inflates file size compared to CSV when data is sparse, but it is a hard constraint of the format. The other surprise: LastUpdated and Description both get their field names silently truncated to 10 characters, which matters if you have two columns whose names only differ after the tenth character — they will collide and one will overwrite the other in the output. If that applies to your data, rename the columns in the CSV before converting.

    About This Tool

    The CSV to DBF Converter produces a valid dBase III+ binary file (version byte 0x03) from any well-formed CSV. The tool reads the header row to generate field descriptors, scans each column to infer whether the type should be C (character) or N (numeric), sets field widths to the maximum value length found in the data, and assembles the binary header, field descriptor array, and fixed-width record block in memory before offering a download.

    DBF is not a format you choose because it is good — you choose it because something downstream requires it. If your target system is Visual FoxPro, ArcGIS shapefile tooling, or a Clipper-compiled application, DBF may be the only path forward. If you are working entirely within modern tooling, stay with CSV — there is no reason to introduce a binary fixed-width format into a pipeline that does not need it.

    Because everything runs client-side using the Web File API and JavaScript ArrayBuffer, the tool is suitable for inventory lists, employee records, or any other data you would not want transmitted to a third-party server. The file is never uploaded anywhere.

    How It Works

    1
    Drop your CSVDrop a .csv file onto the tool or use the browse button. The file is read into memory as an ArrayBuffer — nothing leaves your device.
    2
    Parse, infer, and buildThe tool parses the header row and every data row, respecting quoted fields and embedded commas. Column names are uppercased and truncated to 10 characters to satisfy DBF field name rules. Each column is scanned: if every non-empty value matches /^-?\d+(\.\d+)?$/, the field type is set to N (numeric) with the correct length and decimal count; otherwise it defaults to C (character). Field widths are set to the maximum observed value length, capped at 254 bytes for C fields and 19 bytes for N fields per the dBase III+ specification.
    3
    Download the .dbf fileA valid dBase III+ binary is assembled: 32-byte file header, 32-byte descriptor per field, a 0x0D terminator, space-padded records (deletion flag 0x20 + field values), and the 0x1A EOF marker. A download button appears with the output named yourfile.dbf. The field map is shown below the stats so you can verify types before opening the file in your target application. You can also use our CSV Validator to check your source file for encoding issues or malformed rows before converting.

    CSV vs DBF: Which Format Is Right Here?

    CSV is plain text, universally readable, and trivially inspectable with any text editor, spreadsheet, or command-line tool. DBF is a binary fixed-width format from the dBase era — structured, typed, and opaque to anything that does not explicitly support it.

    The practical rule: use CSV everywhere you have a choice; use DBF only when a specific system demands it. DBF's fixed-width record structure makes random-access reads faster on spinning disk, which mattered in 1984 and is almost never relevant today. What does still matter is compatibility: FoxPro applications cannot open a CSV natively, Esri shapefiles require a paired .dbf, and Clipper runtimes have no alternative path.

    One genuine advantage DBF has over CSV is embedded type enforcement. A N(10,2) DBF field guarantees every value is numeric to two decimal places — something a CSV cannot express without a schema sidecar. If your downstream system uses those type declarations to drive behavior (format masks, sort order, calculation routines), stripping them out by staying in CSV will break things. That is not a reason to prefer DBF; it is a reason to convert when the destination requires it.

    If your end goal is Excel rather than a legacy application, a spreadsheet tool is a better fit. If you are working in the other direction — extracting data from an existing DBF — use the DBF to JSON converter instead.

    Limitations

    🔒 Privacy & Security

    All processing is performed locally using the Web File API and JavaScript ArrayBuffer. Your CSV file is never sent to a server — suitable for sensitive payroll, inventory, or personnel data. The generated .dbf file is assembled in memory and downloaded directly from your browser.