Overview
Introduction
The Esri shapefile format is still common in GIS datasets, government open-data portals, and mapping software exports, but it's really a small bundle of files rather than one file, and most modern web tools want GeoJSON instead.
Upload a .zip containing your shapefile's .shp and .dbf (and optionally .shx/.prj) and get back a pretty-printed GeoJSON FeatureCollection, converted entirely in your browser.
What Is Shapefile to GeoJSON Converter?
A client-side shapefile-to-GeoJSON converter built on shpjs, a library purpose-built for reading zipped shapefiles in the browser and producing GeoJSON.
It reads the geometry from .shp and the attribute table from .dbf, joining them into GeoJSON Features whose properties come from the attribute data.
How Shapefile to GeoJSON Converter Works
The uploaded zip's raw bytes are read as an ArrayBuffer and handed directly to shpjs, which unzips it internally, parses the shape and attribute records, and joins them into GeoJSON Features.
If the zip contains multiple shapefile layers, shpjs returns an array of FeatureCollections instead of one, this tool concatenates every layer's features into a single combined FeatureCollection and reports how many layers were merged.
When To Use Shapefile to GeoJSON Converter
Use this whenever you have a shapefile export from a GIS tool, open-data portal, or government dataset and need GeoJSON for a web map or geospatial API.
It's also useful for a quick sanity check on what's inside a shapefile zip, since GeoJSON's structure is easier to skim than binary .shp/.dbf files.
Often used alongside Shapefile Viewer and GeoJSON Viewer.
Features
Advantages
- Runs entirely client-side, your shapefile data never leaves your browser.
- Handles multi-layer zips by merging them into one FeatureCollection automatically.
- Attribute data from .dbf is joined into each feature's properties, not just bare geometry.
Limitations
- Only accepts a zipped bundle, a bare .shp file alone (without .dbf) isn't supported.
- Very large shapefiles may take a moment to parse in-browser since there's no server-side processing to offload to.
Examples
Best Practices & Notes
Best Practices
- Include the .prj file in your zip if the source data isn't already in standard WGS84 longitude/latitude, for correctly interpreted coordinates.
- Check the reported layer count for zips you didn't build yourself, some downloads bundle more layers than you might expect.
- Pipe the output into GeoJSON Viewer to visually confirm the converted geometry looks right before using it downstream.
Developer Notes
`convertShapefileToGeoJson` in `shapefile-to-geojson-converter.ts` calls `shpjs`'s default export with the file's raw `ArrayBuffer`, normalizes its return value (a single `FeatureCollection` or an array of them) into an array with `Array.isArray(result) ? result : [result]`, then `.flatMap()`s every layer's `features` into one combined `FeatureCollection`, this normalize-then-merge pattern is shared with `shapefile-viewer.ts`, which reads the same input but returns the parsed object instead of a JSON string.
Shapefile to GeoJSON Converter Use Cases
- Converting a government open-data shapefile export to GeoJSON for a web map
- Feeding shapefile-sourced boundaries or points into a GeoJSON-only geospatial API
- Merging a multi-layer shapefile zip into a single combined GeoJSON dataset
Common Mistakes
- Uploading a bare .shp file without zipping it alongside its .dbf, this tool needs the zipped bundle to read attribute data correctly.
- Forgetting to include a .prj file for shapefiles in a non-standard projection, which can lead to coordinates that look right structurally but are off geographically.
Tips
- If conversion fails, double-check the zip actually contains a .dbf alongside the .shp, a missing attribute file is the most common cause.
- Use Shapefile Viewer instead if you just want to look at the geometry visually rather than export GeoJSON text.