Key differences
| Criterion | Shapefile | GeoJSON |
|---|---|---|
| File structure | A bundle of .shp, .shx and .dbf files, usually with .prj and .cpg sidecars | One UTF-8 .geojson or .json text file |
| Coordinate systems | Can describe geographic or projected CRSs in an optional .prj file | RFC 7946 expects WGS 84 longitude/latitude coordinates |
| Attributes | DBF field names are limited to 10 characters and data types are restricted | JSON properties support long names and flexible values |
| Geometry model | One geometry type per Shapefile | A FeatureCollection can mix geometry types |
| Human readability | Geometry and attributes are stored in binary/DBF files | Readable and editable with ordinary JSON tools |
| Primary ecosystem | Desktop GIS, legacy tools and data-delivery standards | Web 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.