togeojson
A small JavaScript library that converts KML and GPX files to GeoJSON. It works in browsers and Node.js and is used to bring track and place data into web maps.
Pick a small issue you can reproduce, then fix it with your AI coding agent.
Share on XLicense: BSD-2-Clause
Overview
togeojson is a small JavaScript library that converts KML and GPX documents to GeoJSON. It works in browsers and in Node.js. You pass a parsed XML DOM to toGeoJSON.kml or toGeoJSON.gpx and get back a plain JavaScript object with GeoJSON data, which you can stringify or hand to mapping libraries. The README describes it as tiny and tested.
Key features
- Converts KML to GeoJSON with toGeoJSON.kml
- Converts GPX to GeoJSON with toGeoJSON.gpx
- Runs in browsers and Node.js
- Returns a plain JavaScript object
Best for
Web developers who need to load KML or GPX track and place data into a map. Input must be an XML DOM, not a string.
- Upstream
- mapbox/togeojson
- Fork on GitHub
- Guo-astro/togeojson
- Upstream stars
- 1.3k
- Category
- Maps and geospatial
- Language
- JavaScript
- License
- BSD-2-Clause
- Forked
- 2020-11-01
- Sync status
- In syncLast synced 2026-10-19
More in Maps and geospatial
A Go terminal map viewer and journey planner for recorded activities and planned routes. Inspect tracks, elevation, and playback offline, or use Mapbox for place search and road routing.
Forked 2026-10-19Last synced 2026-10-19License: MITMaps and geospatialGitHub
GeoLibre is a GIS for visualizing and analyzing geospatial data across browser, desktop, mobile, and notebooks. It keeps work local with browser geoprocessing tools.
Forked 2026-10-07Last synced 2026-10-19License: MITMaps and geospatialGitHub
An open source command line toolkit that turns drone, balloon or kite photos into maps, point clouds, 3D models and elevation models. Used for aerial mapping and surveying.
Forked 2026-06-09Last synced 2026-10-19License: AGPL-3.0Maps and geospatialGitHub
A mobile web prototype for map lighting challenges. An organizer picks a real area and shares a link, and participants light up map cells by walking around it.
Forked 2026-06-09Last synced 2026-10-19No license declaredMaps and geospatialGitHub