KMltoGeoJSON kml or kmz file to GeoJSON JSON.parse(JSON.stringify(toGeoJSON.kml((new DOMParser()).parseFromString(d, 'text/xml')), null, 4)) https://mapbox.github.io/togeojson/