Live Online ConverterChannel: shapefilecsv

Shapefile to CSV Converter

Extract GIS database attributes as simple spreadsheets.

Export spatial attributes to tabular formats. This upcoming tool extracts GIS elements from Shapefiles and formats them as standard CSV spreadsheet rows, complete with coordinate fields.

Drag file here to convert, or select file

Supported file extension: .zip • Max 50MB

Channel: Direct Stream ModeGDAL Driver Operational

Specification Rules

  • Open GIS database tables in spreadsheet tools like Excel
  • Analyze geographic properties in statistical software packages
  • Build coordinate lookup tables for web applications
  • Spatially drops geometric profiles (lines are represent as text strings)
  • Deep relational database indexes cannot translate to spreadsheets
  • Coordinates must format in WKT to preserve complex spatial structures

GDAL Direct Equivalent Terminal Command

sh — gdalready
$ogr2ogr -f CSV output.csv input.shp -lco GEOMETRY=AS_XY

When to use this conversion

Convert when GIS attribute data needs to be opened in Excel, fed into a statistical package (R, pandas, SPSS), or shared with non-GIS colleagues. CSV is the lowest common denominator for tabular spatial data.

Technical Details

GDAL reads the .shp/.dbf, writes a CSV with one row per feature. Geometry encoding is configurable: -lco GEOMETRY=AS_XY for separate longitude/latitude columns (points only), -lco GEOMETRY=AS_WKT for any geometry as a WKT column, or no flag to drop geometry. Attribute columns are preserved with their dBASE names.
Output file size

CSV is typically 1.5–3× the size of the source Shapefile bundle if geometry is included as WKT. Without geometry, CSV is roughly 50–80% of the .dbf size.

Common Errors & Fixes

  • Geometry missing: default ogr2ogr drops geometry. Fix: add -lco GEOMETRY=AS_XY for points or AS_WKT for other types.
  • Encoding garbled in CSV: .dbf was in Windows-1252 but read as UTF-8. Fix: pass -oo ENCODING=ISO-8859-1.
  • WKT column extremely long for polygons: makes the CSV unwieldy in Excel. Fix: use GeoPackage instead, or split into separate point-coordinate columns.
  • Decimal separator wrong for European Excel: dots in CSV, commas in Excel locale. Fix: configure CSV writer or change Excel's locale setting.

Alternative Tools

  • QGIS: export Shapefile as CSV with geometry options in the dialog
  • ogr2ogr CLI: ogr2ogr -f CSV output.csv input.shp -lco GEOMETRY=AS_XY
  • geopandas: gpd.read_file('input.shp').to_csv()
  • DBFView / dBASE explorer for .dbf-only extraction

Frequently Asked Questions

How are geometries saved in a CSV?

Geometries map depending on your settings: coordinates convert to flat columns (Latitude/Longitude) or text strings (WKT).

Are dBASE table records preserved?

Yes, database attributes map directly to columns in the output files.

Is coordinate spatial integrity preserved?

Yes. Spatial boundaries, projections, and attributes map directly to coordinate entries.

Related Transformations Map