What is a .shp file?
Esri Shapefile · Data · Esri · early 1990s
A .shp file is the geometry part of an Esri shapefile, the long-standing standard for GIS vector data: points, lines and polygons for things like country borders, roads and land parcels.
What is a .shp file used for?
A shapefile is really a set of files sharing one name: .shp holds the geometry, .shx the index and .dbf the attribute table, with optional companions like .prj for the projection. Separating any of them breaks the dataset.
The format dates to the early 1990s and its published spec made it the universal exchange format of GIS, despite hard limits (2 GB, field-name lengths, one geometry type per file). Modern work increasingly uses GeoPackage or GeoJSON instead.
How to open a .shp file
The .shp format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list. For a step-by-step walkthrough, see how to open a .shp file.
Windows
- QGIS
- ArcGIS Pro
- GDAL/OGR (ogr2ogr)
macOS
- QGIS
- GDAL/OGR
Linux
- QGIS
- GDAL/OGR
How to convert a .shp file
You can convert a .shp file to geojson, kml, csv (attributes) using a conversion tool or the export menu of an app that opens it.
.shp file signature (magic bytes)
Programs recognise a .shp file by the bytes at the start of the file, not by its name. These are the signatures for Shapefile. For a full breakdown, see the Shapefile file signature page.
| Hex signature | Offset | Note |
|---|---|---|
| 00 00 27 0A | 0 | file code 9994, big-endian |
See the full magic-numbers reference for every format.
Frequently asked questions
What is a .shp file?
A .shp file is the geometry part of an Esri shapefile, the long-standing standard for GIS vector data: points, lines and polygons for things like country borders, roads and land parcels.
How do I open a .shp file?
QGIS (free) or ArcGIS opens it directly; drag the whole fileset in, keeping the .shp, .shx and .dbf files together in one folder.
Why does my shapefile have no attributes or draw in the wrong place?
Missing companions: the .dbf holds the attributes and the .prj the coordinate system. Without them you get bare, possibly misplaced geometry.
How do I convert a shapefile to GeoJSON?
In QGIS export the layer as GeoJSON, or on the command line run ogr2ogr -f GeoJSON out.geojson in.shp with GDAL installed.
Related formats
Sources
Details on this page were checked against authoritative references: