Legacy Vector.shp · .shx · .dbf · .prjMIME: application/octet-stream (typically distributed as .zip)

Shapefile

The 30-year-old ESRI standard that refuses to die.

Specification
ESRI Shapefile Technical Description (1998)
Released
1993
When to use
Use Shapefile when you must exchange data with a partner, government agency, or piece of software that has not modernised in twenty years. It remains the lowest-common-denominator vector format: every desktop GIS reads it, every public-sector tender requests it, and every legacy plotter prints from it. For new projects, prefer GeoPackage; for web maps, prefer GeoJSON.

What is Shapefile?

The ESRI Shapefile is a vector data format published by Esri in 1993 and formalised in a 1998 technical description. It is not a single file but a folder of at least three sibling files that must travel together: the .shp (geometry), .shx (positional index into the .shp), and .dbf (attribute table in legacy dBASE IV format). A .prj file (projection in WKT) is strongly recommended, and additional sidecars like .cpg (codepage), .sbn/.sbx (spatial index), and .qix (quadtree index) are optional. Because the format predates Unicode, attribute encoding is unreliable unless a .cpg file declares the codepage. Attribute names are limited to 10 ASCII characters, numeric fields to 19 digits of precision, and a single .shp file may contain only one geometry type — points, lines, or polygons, never mixed. The 2 GB limit on the .shp and .dbf files (inherited from 32-bit file offsets) bites on large modern datasets. Despite all of this, Shapefile remains the most widely supported vector format in the GIS world, and the OGC GeoPackage standard was explicitly designed to replace it.

Supported by

  • ArcGIS (native format)
  • QGIS (native read/write)
  • GDAL/OGR (driver: ESRI Shapefile)
  • FME, MapInfo Professional, Global Mapper
  • PostGIS via shp2pgsql
  • Python geopandas, fiona, pyshp
  • R sf package
  • Mapbox Studio (upload, converted internally)

Strengths

  • Universal support — every GIS tool reads it
  • Fast to draw from disk thanks to the .shx index and fixed-record .shp layout
  • Mature, stable, and frozen — no compatibility surprises across versions
  • Compact binary geometry, smaller than GeoJSON for the same data

Weaknesses

  • Multi-file format: lose the .dbf or .shx and your data is dead
  • 10-character attribute name limit forces cryptic field names like 'POP_2020'
  • 2 GB hard limit on .shp and .dbf files
  • No Unicode by default — encoding depends on .cpg or guesswork
  • One geometry type per file — separate features for points and lines
  • No native support for 3D measured (M) values across all readers
  • No spatial topology, no relations, no styling

Converters for Shapefile

Validator

Shapefile Validator

Validate a zipped ESRI Shapefile for required components and spatial correctness.

Frequently Asked Questions

Why do I have to ZIP a Shapefile before uploading it?

A Shapefile is really three to seven files that share a basename. Web upload forms accept a single file at a time, so the conventional fix is to ZIP all sidecar files into a single archive with the .shp, .shx, .dbf and (ideally) .prj in the archive root, not in a sub-folder.

Why are my attribute names truncated after conversion?

The .dbf attribute table inherits the dBASE IV limit of 10 ASCII characters per field name. When you convert from a format with longer names (GeoJSON, GeoPackage), GDAL truncates and may append a digit to avoid collisions — 'population_density' might become 'populatn_d' or 'POPULATN_1'.

Can a single Shapefile contain both lines and polygons?

No. Each Shapefile holds exactly one geometry type per file set. If you have mixed geometries, you need separate Shapefiles for each type, or a format that supports mixed collections such as GeoJSON or GeoPackage.

What's the difference between a Shapefile and a shape index file?

The 'Shapefile' colloquially refers to the whole bundle, but technically only the .shp holds geometry. The .shx is a positional offset index that lets readers seek to a specific feature in O(1). The .dbf is the attribute table. Drop any of these three and the dataset is incomplete.

Should I still use Shapefile for new projects?

No, unless you must. Use GeoPackage for desktop GIS workflows (single file, spatial index, no field name limits, Unicode by default) and GeoJSON for web. Shapefile is for interoperability with legacy systems.

Why does my Shapefile show '????' instead of accented characters?

The .dbf file does not store encoding metadata in older versions. Without a .cpg sidecar declaring UTF-8 or a regional codepage, readers fall back to the locale of the machine. Add a .cpg file containing 'UTF-8' to fix it.

Related Formats