# mapbox/togeojson

convert KML and GPX to GeoJSON, without the fuss

Repository: https://github.com/mapbox/togeojson
Canonical: https://ross.abutalabs.com/products/togeojson
Homepage: http://mapbox.github.io/togeojson/
Language: JavaScript
License: BSD-2-Clause
License Family: permissive
Last push: 2026-06-29T15:20:50+00:00

## Health v2 (maintenance only)
Score: 63/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 90, release rhythm 8, longevity 100
- inputs: {"age_days": 5016, "days_push": 65, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1326, forks 322 (observed 2026-08-28T04:04:22.683538+00:00)

## What it is
A tiny, dependency-free JavaScript library that converts KML and GPX documents into GeoJSON, usable in both browsers and Node.js. It also ships a CLI for quick file conversion.

## Use cases
- convert kml files to geo
- convert gpx tracks to geo for leaflet maps
- parse gpx waypoints in node.js
- turn google earth kml placemarks into geo features
- batch convert gps exchange files from the command line
- load kml data into mapbox or leaflet

## When to choose
- you need KML or GPX data as GeoJSON in a browser or Node.js app
- you want a tiny, dependency-free converter
- you use Leaflet or Mapbox and need to ingest KML/GPX layers

## When to avoid
- you need to convert GeoJSON back to KML or GPX
- you need full fidelity for all KML features like NetworkLinks or tours
- you work outside the JavaScript ecosystem

## Facets
- artifact type: library
- maturity: stable
- function: parser, serialization, cli
- domain: web-development, developer-tools
- platform: browser, cli, cross-platform
- tags: geo, kml, gpx, gis, leaflet, format-conversion, maps, geospatial, nodejs

## Member repositories
- mapbox/togeojson (main) score 63

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:22.683538+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:46:23.608766+00:00, confidence not recorded.
  - readme: https://github.com/mapbox/togeojson (fetched 2026-08-28T04:04:22.683538+00:00, sha 7ae66f1047a1)
  - homepage: http://mapbox.github.io/togeojson/ (fetched 2026-08-29T12:05:39.003093+00:00, sha a20b68207563)
  - registry_npm: https://registry.npmjs.org/togeojson (fetched 2026-08-29T12:05:39.005742+00:00, sha 78df53985e5e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
