Convert shapefiles into geoJson without ogr2ogr/GDAL

npm install shp
2 downloads in the last week
19 downloads in the last month


Node.js shapefile parser in pure JS

Thanks to: vanrijkom via RandomEtc

What about shp2json?

Unlike substack's shp2json, this library does not require gdal. Or anything other than fs.


still in testing stages

   var Shp = require('index');
   var shpJson = Shp.readFileSync('path/to/shpfile_base_name');
   // or
   Shp.readFile('path', function(error, data){


  • Allow to be run from commandline as executable
  • Tests actually compare equality of results
  • Tests for shapefiles with multiple features
  • Separate out loading of file to allow preloading
  • Proper support for multiPolygons, etc

Sample Data CC-BY-SA 3.0

npm loves you