Convert a file
Home › Shapefile converter › Shapefile to CSV
SHPCSV

Shapefile to CSV converter

The data you want is in the .dbf. Without GIS software, it is hard to reach. This Shapefile to CSV converter frees the attribute table for Excel, Python or R. Every field becomes a column and every feature becomes a row.

Nothing uploadedGDAL engineReviewed

Drop a file, or click to browse

KML, KMZ, SHP (.zip), GeoJSON, GPKG, GML, GPX, DXF, CSV, Excel, and more

Nothing uploadedGDAL engineWorks offlineNo account

No Shapefile file to hand? Download a sample Shapefile file (100 points) and drop it above to see the conversion.

How to convert Shapefile to CSV

  1. Zip the parts (.shp, .dbf, .shx and ideally .prj) and drop the zip.
  2. The layer and its table are parsed in the tab.
  3. Choose CSV and convert, then open the result in Excel, pandas or R.

What changes when you convert Shapefile to CSV

WhatShapefile → CSV
GeometryChangesPoint features become X and Y columns; lines and polygons are written to a WKT geometry column, so no shape is lost in the table.
AttributesKeptEvery column and full field name moves from Shapefile into CSV untouched.
Styling & labelsKeptNeither Shapefile nor CSV stores visual styling, so there is nothing to lose. Geometry and data carry straight over.
Coordinate systemChangesCSV stores raw coordinates without a CRS tag, so note the coordinate system separately for whoever opens the file.
Elevation (Z)ChangesZ values, if present, appear as an extra column rather than 3D geometry.
File structureKeptA single, self-contained .csv file you can move around on its own.

Why convert Shapefile to CSV?

The part of the shapefile that matters most here is the .dbf, the table holding the attribute values that become your columns; without it the CSV has shapes and no data fields. People convert to leave desktop GIS behind and work with the records as plain rows, since CSV opens instantly in Excel or Google Sheets and pandas reads it with a single call to read_csv. Scripts, databases and APIs take the same file without complaint, which makes this the standard way to hand GIS records to people who never open QGIS.

Coordinate system handling

A shapefile names its coordinate system in the .prj, and the X and Y columns are written in that same system, with no reprojection on the way out. A layer in WGS84 yields longitude and latitude in degrees, while a UTM or State Plane layer yields eastings and northings in meters or feet.

CSV itself stores bare numbers with no coordinate system tag, so record the system, ideally the EPSG code from the .prj, wherever the file travels next.

Checking which system a layer uses takes seconds without any GIS installed, because the .prj is plain readable text; open it in any editor and the first quoted string names the projection outright.

What to check when converting Shapefile to CSV

Geometry lands in the table in two different ways. Point layers get an X and a Y column, written in the layer's own coordinate system rather than converted to latitude and longitude, so a UTM layer yields eastings and northings in meters. Lines and polygons cannot fit two number columns and are written as WKT text in a final geometry column, with elevation kept as an extra column where the layer has it. CSV carries no coordinate system tag, so note the system the layer was in for whoever opens the file next.

Troubleshooting Shapefile to CSV

  • The coordinates are huge numbers, not degrees. The layer sits in a projected system, so X and Y are eastings and northings in that system's units, exactly as stored. Note the EPSG code from the .prj for whoever reads the file, or reproject the layer before converting if degrees are required.
  • The CSV has geometry but no data columns. The .dbf was missing from the zip. It holds every attribute value, so rebuild the zip with all parts inside and convert again.
  • Lines and polygons appear as long text. A cell cannot hold a shape, so LINESTRING and POLYGON geometry is written as WKT in the final column. GIS software and libraries like Shapely read that column back into real geometry.
  • Excel mangles the file on open. Double-clicking lets Excel reformat long decimals and turn IDs into dates. Use Data > From Text/CSV, or convert to XLSX directly, and the columns keep their types.
  • Accented names turn into question marks or boxes. Text in the .dbf is stored in whatever codepage the producing software used, and the .cpg part is what names it. Keep that part in the zip so the labels decode correctly, and when the source never shipped one, repair the affected columns in the spreadsheet afterward rather than re-typing the data.

About the formats

A Shapefile arrives as a bundle of parts, with geometry in the .shp and the attribute table in the .dbf, and CSV flattens all of that into one plain-text sheet. Each feature becomes a row: point coordinates land in X and Y columns in the layer's own coordinate system, while lines and polygons travel as WKT text. The pairing turns a GIS-only layer into something any spreadsheet, script or database import can read.

Frequently asked questions

Can I read the resulting file with pandas or R?

Yes, the output is plain text, so read_csv loads it in one line and R takes it with read.csv just as easily. QGIS can also load the file back as points by reading the coordinate columns.

Why are the column headers in my CSV so short?

Shapefile field names are capped at 10 characters, and those short names carry straight into the CSV header row. Rename the columns afterward in Excel or pandas when fuller labels are needed.

How do I stop Excel from changing my IDs into dates?

Import the file through Data > From Text/CSV rather than opening it by double-click, so each column keeps its type. The import dialog also stops Excel from rounding long decimals and dropping leading zeros.

Do I need to include every part of the shapefile?

Yes, zip the full set together, because each part carries something the table needs. The .shp holds the shapes, the .dbf holds the attribute values that become your columns, and the .prj records the coordinate system the X and Y values are written in.

Where does the geometry go when the layer becomes a CSV?

Point features get an X and a Y column in whatever coordinate system the layer itself uses. Lines and polygons cannot fit two tidy columns, so their vertices land as WKT text in a final geometry column that QGIS or Shapely parses back into shapes.

Is this the right tool for a whole folder of shapefiles?

One layer per run is the design, which suits checking a delivery or handing a single table onward. A nightly export or a directory of county files calls for a script instead, where ogr2ogr loops the folder in one command and writes a CSV per layer without a browser in the loop.

Related converters

Ready to convert?

Drop a file and download the result in seconds. Nothing is uploaded, nothing is stored.