Why convert SHP to CSV?
A Shapefile stores two things: vector geometry and an attribute table. CSV opens in Excel, Google Sheets, LibreOffice, and virtually any database import wizard. Exporting to .csv is common when non-GIS users need the underlying tabular data - parcel IDs, population counts, point coordinates - without GIS software.
How to convert SHP to CSV
QGIS FREE
Right-click the loaded layer and choose Export > Save Features As, select CSV, and set GEOMETRY to AS_XY for point layers or NONE for lines and polygons.
ogr2ogr OPEN-SOURCE
Run ogr2ogr -f CSV out.csv in.shp -lco GEOMETRY=AS_XY for point layers; use -lco GEOMETRY=NONE for attribute data only.
LibreOffice Calc FREE
Open the .dbf sibling file directly via File > Open in LibreOffice Calc, then save as CSV - no GIS software needed.
About these formats
A .shp file is almost always an Esri Shapefile - geospatial vector data (points, lines, polygons) used by GIS software. It is one piece of a set: it needs its sibling files (.shx, .dbf, and…
Open .SHP details →A CSV file stores tabular data as plain text - one row per line, values separated by commas (or semicolons in European locales). Any spreadsheet opens it: Excel, Google Sheets, LibreOffice…
Open .CSV details →Quality & what to watch
- For line and polygon layers, geometry does not transfer to CSV rows; use AS_WKT to write geometry as a text string if the shape must be preserved.
- Field names in the
.dbfare truncated to 10 characters (a dBASE limit), which carries over to the CSV. - All sibling files (
.shx,.dbf, and ideally.prj) must be in the same folder for QGIS or ogr2ogr to open the Shapefile correctly.
Frequently asked questions
Can I get coordinates in the CSV for a point Shapefile?
ogr2ogr -lco GEOMETRY=AS_XY; this adds longitude and latitude columns to each row.Do I need GIS software to open the attribute data?
.dbf file that LibreOffice Calc can open directly via File > Open.