{
  "slug": "gpx-to-geojson",
  "name": "gizza-ai/gpx-to-geojson",
  "version": "0.1.0",
  "title": "GPX/KML to GeoJSON Converter (and back to GPX) — gizza.ai",
  "description": "Convert GPX or KML GPS tracks and waypoints into GeoJSON, or GeoJSON back into GPX, entirely in your browser. Free, private, no upload.",
  "tags": [
    "gpx to geojson",
    "kml to geojson",
    "geojson to gpx",
    "gpx converter",
    "kml converter",
    "gps track converter online"
  ],
  "category": "utilities",
  "urls": {
    "page": "https://gizza.ai/tools/gpx-to-geojson/",
    "markdown": "https://gizza.ai/tools/gpx-to-geojson/index.md",
    "descriptor": "https://gizza.ai/tools/gpx-to-geojson/tool.json",
    "deep_link_example": "https://gizza.ai/tools/gpx-to-geojson/?input=%3Cgpx%20version%3D%271.1%27%3E%3Ctrk%3E%3Cname%3EMorning%20Run%3C%2Fname%3E%3Ctrkseg%3E%3Ctrkpt%20lat%3D%2752.1%27%20lon%3D%275.1%27%3E%3Cele%3E10%3C%2Fele%3E%3C%2Ftrkpt%3E%3Ctrkpt%20lat%3D%2752.2%27%20lon%3D%275.2%27%3E%3Cele%3E12%3C%2Fele%3E%3C%2Ftrkpt%3E%3C%2Ftrkseg%3E%3C%2Ftrk%3E%3C%2Fgpx%3E&output_format=geojson&include_styles=true"
  },
  "cli": "gizza tool gpx-to-geojson \"<gpx version='1.1'><trk><name>Morning Run</name><trkseg><trkpt lat='52.1' lon='5.1'><ele>10</ele></trkpt><trkpt lat='52.2' lon='5.2'><ele>12</ele></trkpt></trkseg></trk></gpx>\"",
  "tool": {
    "description": "Convert GPX or KML GPS data into GeoJSON, or GeoJSON back into GPX — the input format is auto-detected from the content. GPX -> GeoJSON: <trk>/<trkseg>/<trkpt> becomes a LineString (or MultiLineString for a multi-segment track), <rte>/<rtept> becomes a LineString, <wpt> becomes a Point; standard tags (name, cmt, desc, link, keywords, sym, type) become properties, elevation becomes the position's third coordinate, and per-point timestamps become a coordTimes property. KML -> GeoJSON: a Placemark's Point/LineString/Polygon becomes the matching geometry, MultiGeometry becomes a GeometryCollection; name/description become properties, ExtendedData/SimpleData become arbitrary properties, TimeSpan/TimeStamp become begin/end/time properties, and (when include_styles=true, the default) each Placemark's inline or shared Style/styleUrl/StyleMap color and line width are resolved into simplestyle-spec properties (stroke, stroke-width, stroke-opacity, fill, fill-opacity, marker-color). Set output_format=gpx to convert GeoJSON back into GPX: Point becomes a wpt, LineString/MultiLineString becomes a trk (one trkseg per line, restoring per-point <time> from a coordTimes property when present), and a Polygon's exterior ring becomes a trk (GPX has no polygon primitive, so interior rings/holes are dropped). Runs fully locally, no network access.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "include_styles": {
          "default": true,
          "description": "KML input only: fold each Placemark's Style/styleUrl/StyleMap color and width into simplestyle-spec properties (stroke, stroke-width, stroke-opacity, fill, fill-opacity, marker-color). Ignored for GPX input and for output_format=gpx. Default true.",
          "type": "boolean"
        },
        "input": {
          "description": "The document to convert: GPX or KML XML text, or a GeoJSON document (FeatureCollection, Feature, or bare geometry). The format is auto-detected from the content — no separate format selector needed.",
          "type": "string"
        },
        "output_format": {
          "default": "geojson",
          "description": "Target format. 'geojson' (default) converts GPX/KML input into a GeoJSON FeatureCollection. 'gpx' converts GeoJSON input back into a GPX document (Point -> wpt, LineString/MultiLineString -> trk, Polygon's exterior ring -> trk).",
          "enum": [
            "geojson",
            "gpx"
          ],
          "type": "string"
        }
      },
      "required": [
        "input"
      ],
      "type": "object"
    }
  }
}