# RavingDesk GPS File Converter (GPX ↔ KML ↔ GeoJSON) > Convert GPX, KML and GeoJSON, simplify tracks and get length, climb, descent and duration. Converts GPS files between GPX 1.1, KML 2.2 and GeoJSON (waypoints, routes, tracks, placemarks, polygons, names, descriptions, elevations and times where the target format has them), optionally simplifies lines with Douglas–Peucker or Visvalingam–Whyatt at a tolerance in metres, and reports for every track the geodesic length on WGS84, elevation range, climb and descent with a noise threshold, duration and average speed. XML is read with a safe parser that refuses entity declarations. It is the GPS engine of RavingDesk’s Data & charts. Part of usefulweb.app (https://usefulweb.app/). Part of [RavingDesk](https://ravingdesk.usefulweb.app/) (ownerApp: ravingdesk). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://ravingdeskgpsfileconverter.usefulweb.app/ (interactive tool at https://ravingdeskgpsfileconverter.usefulweb.app/tool) - JSON API: POST https://ravingdeskgpsfileconverter.usefulweb.app/api/v1/calculate with a JSON object of inputs (schema: https://ravingdeskgpsfileconverter.usefulweb.app/api/v1/tool) - OpenAPI: https://ravingdeskgpsfileconverter.usefulweb.app/openapi.json - MCP (Streamable HTTP): https://ravingdeskgpsfileconverter.usefulweb.app/mcp - tool `ravingdesk_gps_file_converter` ## Inputs - file (file): GPS file (GPX, KML or GeoJSON) - Up to 10 MB and 200,000 points. KMZ files must be unzipped first. - text (textarea): Or paste the file content - to (select): Convert to - simplify (select): Simplify lines - toleranceM (number): Simplification tolerance - elevationThresholdM (number): Elevation noise threshold - Climbs and descents are counted only after the elevation moved this far from the last turning point (GPS heights are noisy). ## Method - GPX 1.1: waypoints become Points, routes and track segments become LineStrings (several segments: a MultiLineString), with name, description, elevation (third coordinate) and time stamps (properties.times). KML 2.2: Placemarks with Point, LineString, LinearRing, Polygon (with holes), MultiGeometry and gx:Track, plus name, description and ExtendedData. Styles, folders, network links, overlays and 3D models are not converted. - Writing GPX: points → waypoints, lines → tracks (or routes when the feature came from a GPX route), polygons → closed tracks of their outer rings (GPX has no polygons). Writing KML: one Placemark per feature with name, description and simple properties as ExtendedData; time stamps are not written. - XML is parsed by a small reader that refuses DOCTYPE definitions and entity declarations (no XXE, no entity expansion), accepts only the five predefined entities and character references, and limits size, element count and depth. - Track length is the geodesic length on WGS84 (Karney’s algorithm); the 3D length adds the elevation change of every segment. Climb and descent use hysteresis: a change counts only after it exceeds the threshold from the last turning point. Duration is last minus first time stamp; the average speed includes stops. - Douglas–Peucker keeps every vertex farther than the tolerance from the simplified line; Visvalingam–Whyatt removes the vertex with the smallest triangle area until all are above the tolerance. Both measure in a local equirectangular projection (metres) around each line.