Convert SHP to CSV
Export shapefile attributes, coordinates, or WKT geometry to a compatible CSV table.
Make CSV files online
We can't read SHP files yet, so this conversion isn't available. If you can export your work to one of these formats - or others - we'll turn it into CSV:
How to convert shp to csv file
- Databases
- No ratings yet.
A reporting system, spreadsheet, or database may accept tabular CSV but not an ESRI Shapefile. Exporting the data creates a portable table, while an explicit geometry export is required if coordinates or shapes must remain available.
What the SHP format is
In the geospatial database context, SHP refers to the ESRI Shapefile format, used for vector points, lines, and polygons. A usable dataset normally includes files with the same base name: .shp stores geometry, .shx stores the geometry index, .dbf stores attribute records, .prj may define the coordinate reference system, and .cpg may identify the DBF character encoding.
GIS applications such as QGIS, ArcGIS Pro, ArcGIS Desktop, and GeoPandas read and create shapefiles. Common examples include census boundaries, roads, utility networks, land parcels, GPS points, and administrative areas.
What the CSV format is
CSV is a plain-text table in which records occupy lines and fields are separated by a delimiter, usually a comma. Spreadsheets, relational databases, statistical applications, scripts, and reporting systems can import it without GIS software.
CSV can contain the shapefile’s attribute table, but it has no standard native representation for polygons, lines, coordinate reference systems, or spatial indexes. To retain location, export geometry as a WKT text field or export point geometry as separate coordinate fields. WKT in CSV is a convention, not a spatial database type.
How to convert SHP to CSV
Using QGIS
- Put the
.shp,.shx,.dbf, and available.prjand.cpgfiles in one folder. Keep matching base names unchanged. - Open the layer with Layer → Add Layer → Add Vector Layer and verify the features and attribute table.
- Right-click the layer and select Export → Save Features As….
- Set Format to
Comma Separated Value [CSV], specify an output filename, and useUTF-8unless the receiving system requires another encoding. - In the geometry options, choose
AS_WKTto preserve points, lines, or polygons in a geometry column. For a point layer, chooseAS_XYorAS_XYZwhen separate coordinate columns are preferred. ChooseNO_GEOMETRYwhen only attributes are needed. - Click OK. Inspect the output in a text editor or import it into the destination system, checking delimiters, quoted values, field names, encoding, and geometry values.
Using GDAL
GDAL’s ogr2ogr is suitable for repeatable and batch conversions. From the directory containing the source files, export attributes and WKT geometry with:
ogr2ogr -f CSV output.csv input.shp -lco GEOMETRY=AS_WKT
To export selected attributes while retaining WKT, replace the field names with actual DBF columns:
ogr2ogr -f CSV output.csv input.shp -select field1,field2,field3 -lco GEOMETRY=AS_WKT
For an attribute-only export, omit the geometry creation option or use the CSV driver’s no-geometry option supported by the installed GDAL version. GDAL reads attributes from .dbf and may read the coordinate reference system from .prj, but CRS metadata is not reliably preserved in the resulting CSV.
Using an online converter
GIS conversion services such as MyGeodata Cloud can process a shapefile supplied as a ZIP archive. Include the matching .shp, .shx, and .dbf files, plus .prj and .cpg when available; upload the archive, select CSV, configure geometry output if offered, and download the result.
Check the service’s file-retention, privacy, size, and geometry-handling policies before uploading confidential, personal, or restricted spatial data. Use QGIS or GDAL for sensitive data and for conversions that must be reproducible.
Quality and compatibility considerations
- Geometry can be lost: an attribute-only CSV cannot recreate mapped shapes. Use WKT for any geometry type or coordinate columns for point layers.
- CRS affects coordinates: longitude and latitude are meaningful only with the correct coordinate reference system. Reproject in QGIS or GDAL before export when the recipient requires WGS 84, commonly identified as
EPSG:4326. Record the CRS separately because CSV does not standardize it. - Shapefile limitations remain: DBF field names, types, widths, and encoding follow legacy restrictions. CSV export cannot recover values or names already truncated in the source DBF.
- Delimiters and quoting matter: commas, quotation marks, and line breaks inside values must be escaped according to CSV rules. Import the file with the delimiter and encoding used during export.
- Large geometries may produce unwieldy files: WKT repeats coordinate text and CSV has no spatial index. Use GeoPackage, GeoJSON, or another spatial format when geometry, CRS, and GIS performance must be retained.
SHP vs CSV: format comparison
How the SHP and CSV formats compare on the properties that matter most for this conversion.
| Property | .SHP Esri Shapefile | .CSV Comma-Separated Values |
|---|---|---|
| Open standard | Partly open | Yes |
| Compression | Uncompressed | Uncompressed |
| Typical file size | Medium | Small |
| Opens in a web browser | No | Yes, natively |
| Further editing | Limited | Easy |
| Metadata support | Basic | Basic |
| Plain-text readable | No | Yes |
| Best used for | Data exchange | Data exchange |
| Introduced | 1998 | — |
| Developer | Esri | — |
| MIME type | application/x-esri-shape | text/csv |