Shapefile to GeoJSON Converter

Convert ESRI Shapefiles to GeoJSON entirely in the browser

Free Shapefile to GeoJSON converter — parse a .shp plus optional .dbf and .prj and output a valid RFC 7946 FeatureCollection. Points, lines, and polygons with attributes, converted client-side with no GIS software or upload. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

Which shapefile parts do I need?

Only the .shp is required for geometry. Add the .dbf to carry attributes into each feature's properties, and the .prj so the tool can report the source coordinate reference system. The .shx index is not needed because records are walked sequentially.

A Shapefile to GeoJSON converter translates ESRI’s binary format into the open, web-friendly GeoJSON standard. Shapefiles power decades of GIS data but cannot be read directly by web maps or most modern tooling. This converter parses the geometry and attributes in your browser and emits a clean RFC 7946 FeatureCollection you can drop into Leaflet, Mapbox, QGIS, or a data pipeline.

How it works

The .shp file starts with a 100-byte header and then a list of records. Each record header carries a big-endian content length, while the geometry payload uses little-endian doubles. The converter reads each record’s shape type and decodes it: a Point becomes a GeoJSON Point, a multi-part line becomes a LineString or MultiLineString, and polygon rings are grouped using their signed area — clockwise rings are outer boundaries and counter-clockwise rings become holes — producing correct Polygon and MultiPolygon geometries.

If you include the .dbf, its dBASE header is read to learn each field’s name, type, and width. Records are decoded field by field, with numeric and float columns parsed into JSON numbers, and attached to the matching feature’s properties. A supplied .prj is reported so you know the source coordinate reference system.

Coordinate systems and when to reproject

GeoJSON (RFC 7946) assumes WGS84 longitude/latitude. The tool outputs coordinates unchanged, so if your .prj indicates a projected system — a UTM zone, British National Grid, or a state-plane system — the raw coordinates will not display correctly on a web map. You have two good options:

  1. Reproject the shapefile to EPSG:4326 before converting, using QGIS, GDAL’s ogr2ogr, or any GIS software.
  2. Convert first with this tool, then reproject the resulting GeoJSON using a tool that reads the source CRS from the .prj.

Because everything is parsed client-side, the converter works fully offline once the page has loaded and keeps your data private — no geometry is ever uploaded.

What each shapefile component contributes

FileRequiredPurpose
.shpYesBinary geometry records
.shxNoSpatial index — not needed for sequential parsing
.dbfRecommendedAttribute table becomes GeoJSON properties
.prjRecommendedCRS description so you know if reprojection is needed
.cpgOptionalCode page for text fields in the .dbf

Practical tips

  • Large files — The browser can handle datasets of tens of thousands of features, but very large shapefiles (hundreds of MB) may be slow. For production pipelines, ogr2ogr -f GeoJSON on the command line is faster.
  • Polygon winding — This converter follows RFC 7946 and assigns outer rings by clockwise area and inner rings (holes) counter-clockwise. If your source shapefile has inconsistent winding, some holes may appear as fills; QGIS can clean winding with the Fix Geometries tool.
  • Multi-part geometries — A shapefile PolyLine record with multiple parts becomes a GeoJSON MultiLineString, and a Polygon with multiple outer rings becomes a MultiPolygon, preserving topological structure exactly.