GeoConvert
Resources

GIS format comparison

Shapefile vs GeoJSON: Which format should you use?

Shapefile is a multi-file binary GIS format built for broad desktop compatibility, while GeoJSON is a single human-readable JSON file built for web maps, APIs and software development. Both store vector geometry and attributes, but they differ sharply in packaging, coordinate-system rules and data-model limits.

Quick answer

Choose GeoJSON for new web, API and version-control workflows. Choose Shapefile when a client, agency or legacy desktop GIS explicitly requires it. When either is accepted, GeoJSON is usually easier to move and inspect; Shapefile remains the safer compatibility choice for older GIS systems.

Key differences

CriterionShapefileGeoJSON
File structureA bundle of .shp, .shx and .dbf files, usually with .prj and .cpg sidecarsOne UTF-8 .geojson or .json text file
Coordinate systemsCan describe geographic or projected CRSs in an optional .prj fileRFC 7946 expects WGS 84 longitude/latitude coordinates
AttributesDBF field names are limited to 10 characters and data types are restrictedJSON properties support long names and flexible values
Geometry modelOne geometry type per ShapefileA FeatureCollection can mix geometry types
Human readabilityGeometry and attributes are stored in binary/DBF filesReadable and editable with ordinary JSON tools
Primary ecosystemDesktop GIS, legacy tools and data-delivery standardsWeb mapping, APIs and developer tooling

When to choose Shapefile

Legacy ArcGIS/QGIS exchange, formal submissions that require .shp, compact indexed desktop datasets and workflows that expect one geometry type per layer.

When to choose GeoJSON

Web maps, JavaScript applications, REST APIs, source control, quick inspection and datasets whose attributes or geometry types do not fit Shapefile limits.

Conversion and migration checks

  • Zip every Shapefile component before uploading or sharing so .shp, .shx, .dbf and .prj stay together.
  • Reproject a projected Shapefile to WGS 84 before writing standards-compliant GeoJSON.
  • When converting GeoJSON to Shapefile, check for field-name truncation, nested properties and mixed geometry types.
  • Open the result on a trusted basemap and compare feature counts and important attributes.

Convert between Shapefile and GeoJSON

Read the format guides

Frequently asked questions

Is GeoJSON better than Shapefile?
GeoJSON is generally better for web and developer workflows because it is a single readable file with fewer attribute limits. Shapefile is better when compatibility with legacy GIS software or a required submission format matters most.
Is Shapefile smaller than GeoJSON?
Raw Shapefile geometry is binary and often smaller than uncompressed GeoJSON, but a zipped GeoJSON can compress very well. Actual size depends on coordinate precision, attributes and geometry complexity.
Will converting between Shapefile and GeoJSON lose data?
It can. Shapefile may truncate long field names, flatten unsupported values and reject mixed geometry types. GeoJSON also requires WGS 84 under RFC 7946, so projected source data must be reprojected correctly.

Related format comparisons