Converting Shapefile to GeoJSON unpacks the Esri multi-file set into a single, human-readable JSON document ready for the web.
What is Shapefile?
The Shapefile is a widely used vector data format developed and published by Esri, stored as a set of sibling files that share a common base name.
A single "shapefile" is really a bundle: the mandatory .shp (feature geometry), .shx (a shape index for fast seeking), and .dbf (a dBASE table of attributes), usually alongside a .prj (coordinate system) and sometimes a .cpg (attribute encoding). It is the lingua franca of desktop GIS and is read by virtually every tool, from ArcGIS and QGIS to GDAL/OGR. Its age shows in several hard limits: DBF attribute field names are truncated to 10 characters, each file component is capped at 2 GB, every file holds a single geometry type, and attribute types are constrained to what DBF supports (limited-width text, numbers, dates, and booleans).
What is GeoJSON?
GeoJSON is an open, JSON-based format for encoding vector geographic features and their attributes, standardized as RFC 7946 by the IETF.
A GeoJSON document is plain UTF-8 JSON built from Feature and FeatureCollection objects, each pairing a geometry (Point, LineString, Polygon, and their Multi* variants, or a GeometryCollection) with a free-form "properties" object. Because it is human-readable text, it works well with version control, text diffing, and any JSON tooling, and it is the de facto interchange format for web maps and JavaScript libraries such as Leaflet, Mapbox GL, and OpenLayers. Unlike Shapefile it imposes no field-name length limit, mixes geometry types freely within one collection, and stores everything in a single file.
Why convert Shapefile to GeoJSON?
GeoJSON is the native language of web maps and JavaScript mapping libraries, so this is the go-to conversion for publishing desktop GIS data online or feeding it to an API. A single text file is far easier to store in version control, diff, and stream than a bundle of binary sidecars. It also removes Shapefile’s field-name and geometry-type limitations for downstream use.
Coordinate systems
The coordinate reference system lives in the optional .prj sidecar as a WKT (well-known text) string. When the .prj is absent the CRS is genuinely unknown and consumers typically fall back to assuming WGS84, which can silently misplace data that was in another projection.
Per RFC 7946, coordinates are longitude/latitude in decimal degrees on the WGS84 datum (EPSG:4326), and the specification removed the older "crs" member, so a compliant GeoJSON file is always assumed to be WGS84. Coordinate order is [longitude, latitude], optionally followed by elevation.
What to watch out for
- If the .prj sidecar is missing, the source CRS is unknown and is assumed to be WGS84; verify this, since a wrong assumption silently misplaces features.
- Data in a projected CRS should be reprojected to WGS84 (EPSG:4326) because RFC 7946 GeoJSON expects longitude/latitude.
- Attribute field names were already truncated to 10 characters in the DBF, so the GeoJSON inherits those shortened names.
- The character encoding of DBF text depends on the .cpg file; without it, non-ASCII attribute values can be misread.
How to convert Shapefile to GeoJSON
- Drag your Shapefile file (.shp, .shx, .dbf, .prj, .cpg, .qpj) into the converter above, or click to browse.
- Confirm the source is Shapefile and choose GeoJSON as the output format.
- Optionally pick a target coordinate system (EPSG) to reproject.
- Click Convert and download your GeoJSON file. Everything runs in your browser.
Frequently asked questions
- Do I need to upload all the sidecar files?
- Yes — at minimum the .shp, .shx, and .dbf, plus the .prj so the coordinate system is known. Zipping the whole set together is the easiest way.
- What if my Shapefile has no .prj file?
- Without a .prj the coordinate system is unknown and is assumed to be WGS84, which may be incorrect for projected data. Include the .prj whenever possible.
- Will my short field names be restored to their full length?
- No. The names were permanently truncated to 10 characters when the DBF was created, so the original long names cannot be recovered.