DBF to JSON Converter
Pulling records out of a .dbf file shouldn't require installing FoxPro, dBASE, or a legacy ODBC driver. This tool reads the binary DBF structure directly in your browser — header, field descriptors, data types, and all — and exports a clean JSON array ready for any modern system. No server, no upload, no software.
Example Conversion
Input: inventory.dbf from a FoxPro 2.6 system — 6 fields, 3,200 records, including numeric, character, date, and logical types.
Output: A JSON array where each DBF record becomes an object with correctly-typed values — numbers as numbers, dates as YYYY-MM-DD strings, and logicals as true/false.
Field Type Len Dec ITEMNO N 6 0 DESCRIP C 30 — PRICE N 10 2 QTY N 8 0 UPDATED D 8 — ACTIVE L 1 —
[
{
"ITEMNO": 1042,
"DESCRIP": "Hex Bolt M8x25",
"PRICE": 0.45,
"QTY": 500,
"UPDATED": "2019-03-14",
"ACTIVE": true
},
...
]
The most common confusion point here is the character field padding. DBF stores C-type fields as fixed-width, space-padded strings. A 30-character DESCRIP field holding the value Hex Bolt M8x25 is actually stored as Hex Bolt M8x25 on disk. This tool trims trailing whitespace from all character fields automatically — if it did not, every string value in your JSON would arrive with a tail of spaces that would silently break string comparisons and deduplication logic downstream.
Common Use Cases
- GIS shapefile attribute extraction — Every ESRI shapefile ships with a companion
.dbfholding the feature attribute table. Use this tool to pull those attributes into JSON for use with Leaflet, Mapbox GL JS, or a PostGIS ingestion pipeline without installing ArcGIS or GDAL. - FoxPro and Clipper legacy migration — Organizations still running Visual FoxPro 6 or Clipper 5 applications often need a one-off way to extract table data before decommissioning the system. This tool handles the conversion without needing a running dBASE installation or ODBC driver.
- Accounting software data export — Older accounting packages like Sage 50 (Peachtree), MYOB, and QuickBooks DOS editions used DBF internally. When migrating to a modern platform, this tool provides a clean JSON snapshot of any exported
.dbffile. - Sensitive or proprietary data — local-only processing — Client records, financial ledgers, and personnel databases should never pass through a third-party server. Because this tool runs entirely in your browser with no network calls, it is appropriate for data that cannot leave the local machine.
- One-off field inspection and data sampling — Before committing to a full ETL pipeline, use the JSON output to quickly inspect field names, data types, and representative values. The file detail panel also reports the DBF version, last-modified date, record count, and record length without converting anything.
- Feeding a REST API or NoSQL store — DBF data is relational-table-shaped but JSON is what MongoDB, Firestore, and most REST endpoints expect. The direct conversion skips the intermediate CSV step and preserves type information that CSV would flatten to strings.
Why JSON Instead of CSV or XML?
DBF data can be exported to several formats. The right choice depends on where the data is going. If the destination is a spreadsheet tool like Excel or Google Sheets, a DBF to Excel conversion is the more pragmatic step — Excel opens directly with no parsing needed. JSON is the better choice when the data is headed for any API endpoint, JavaScript application, document database, or data pipeline that expects typed values.
The key advantage of JSON over CSV for DBF data is type preservation. DBF fields have explicit types: N (numeric), D (date), L (logical), C (character). A CSV export collapses all of these to plain text, which means every consumer has to re-infer types — and often gets it wrong, particularly for dates and leading-zero numeric codes. JSON carries the type through, so PRICE: 0.45 arrives as a float, not the string "0.45", and ACTIVE: true arrives as a boolean. Once you have JSON, you can validate and reformat it with a JSON formatter before sending it downstream.
JSON is also preferable to XML when the output is consumed by Node.js, Python, or any modern web framework — those ecosystems parse JSON natively and have no special need for the verbosity XML adds. XML is the right choice only if the destination is an enterprise middleware or SOAP service that requires it.
About This Tool
The DBF to JSON Converter reads the raw binary structure of a .dbf file using the Web File API and a JavaScript ArrayBuffer. It parses the 32-byte file header to extract the DBF version, last-modified date, record count, header length, and record size. It then reads each 32-byte field descriptor to build a schema — field name, data type, length, and decimal count — before scanning the data records themselves.
Supported DBF variants include dBASE III (version byte 0x03), dBASE IV (0x04), dBASE V (0x05), Visual FoxPro (0x30), and dBASE III/IV with memo fields (0x83, 0x8B). The field type mapping covers C (Character), N (Numeric), F (Float), D (Date), L (Logical), I (Integer), and M (Memo — see Limitations). Logically deleted records — those marked with the 0x2A deletion flag — are skipped and counted separately, which is consistent with how dBASE itself treats them before a PACK operation.
If you are working with a shapefile's attribute component, note that the .dbf file can be opened independently of the .shp and .shx files. The JSON output from this tool maps cleanly to a GeoJSON properties object if you are assembling features manually. For a full shapefile-to-GeoJSON workflow, the DBF Validator can help you audit the field schema before committing to a conversion.
DBF vs CSV: When Each Format Makes Sense
DBF and CSV both represent tabular data, but they solve different problems. DBF is a typed, binary, schema-bearing format: it knows that BALANCE is a two-decimal numeric, that HIRED is a date, and that ACTIVE is a boolean. CSV is untyped plain text: every value is a string until a reader decides otherwise.
DBF is better when the original schema needs to travel with the data — it prevents the type-guessing that causes a field like 001234 to lose its leading zero in Excel. CSV is better when the destination is a human reader, a spreadsheet, or a bulk-import tool that already knows the schema. The practical recommendation: use CSV when data ends with a person; use JSON when data ends with code. DBF's binary format is also less portable than either — CSV and JSON open in any text editor, while DBF requires a compatible reader or a conversion step like this one.
One edge case worth knowing: very old DBF files created with Clipper or dBASE III sometimes encode character data in code page 437 (OEM PC) rather than Windows-1252 or UTF-8. This tool reads bytes as Latin-1 / ISO-8859-1, which covers Western European characters correctly, but Cyrillic, Greek, or East Asian data encoded in a non-Western code page will appear garbled. A full code-page-aware conversion requires knowing which code page was active when the file was written — usually recorded in byte 29 of the DBF header.
Limitations
- Memo fields are not extracted — DBF
M-type (memo) fields store variable-length text in a separate.dbt(dBASE) or.fpt(FoxPro) file. Because the browser receives only the.dbffile, memo columns will output asnull. If memo content matters, export the table to CSV or XML from within the originating application first. - Non-Western code pages may produce garbled strings — As noted above, character fields in pre-2000 DBF files are often encoded in OEM code pages rather than UTF-8. This tool performs no code-page translation. If strings with accented characters look wrong, the source file is likely using a non-Latin code page.
- Deleted records are skipped, not surfaced — Logically deleted rows (marked
0x2A) are excluded from the JSON output. The warning panel reports how many were skipped. If you need to recover deleted rows, you will need a DBF editing tool that can expose them before running this conversion. - Very large files may hit browser memory limits — A 200 MB DBF file with a 500-byte record size contains roughly 400,000 records. Serializing all of them to a JSON string in-memory is feasible in most desktop browsers, but on mobile or low-RAM devices the tab may crash before the download is ready. For files above 50 MB with many fields, test in a desktop Chrome or Firefox session.
- Binary and OLE object fields are not supported — FoxPro
B(binary),G(general/OLE), andP(picture) field types are uncommon and not handled. Rows containing these types will still be included, but the affected field value will be returned asnull.
🔒 Privacy & Security
All processing is performed locally using the Web File API and JavaScript ArrayBuffer. Your file is never sent to a server — suitable for sensitive or private content including personnel records, financial ledgers, and client databases.
