GeoJSON, KML and GPX Converter
Convert GeoJSON to KML, GPX, CSV or WKT and back in your browser. Points, lines, polygons and Multi geometries, with a feature count and a preview.
- Features
- 0
- Points
- 0
- Lines
- 0
- Polygons
- 0
- Vertices
- 0
How to convert GeoJSON, KML, GPX, CSV and WKT
- Drop a file on the drop zone or paste data into Input data. Files are read by your browser and never uploaded.
- Leave From on Detect automatically, or pick the input format yourself. Detection looks at the first characters:
{or[means GeoJSON,<gpxmeans GPX, other XML is read as KML, a keyword such asPOINTorMULTIPOLYGONmeans WKT, and anything else is treated as CSV. - Choose the output format under To. The result appears as you type; Convert runs it again.
- Check the counts (Features, Points, Lines, Polygons, Vertices) and the preview drawing, then Copy the result or Download it with the right extension.
What each format keeps
All conversions go through GeoJSON (RFC 7946) as a common model: a list of features, each with an optional geometry and a set of properties. Points, LineStrings, Polygons (with holes), MultiPoints, MultiLineStrings, MultiPolygons and GeometryCollections are supported. Coordinates are longitude, latitude and an optional altitude, in WGS 84 degrees; the tool does not reproject.
- GeoJSON: everything is kept, including nested properties and feature ids.
- KML: each feature becomes a Placemark. The
nameanddescriptionproperties map to the KML elements of the same name; other properties go intoExtendedData. Multi geometries becomeMultiGeometry. When reading, the tool walks every Folder, readsDataandSimpleDatavalues, and also understands Google Earthgx:Trackrecordings. Styles, icons, ground overlays and network links are ignored. KMZ is a zipped KML: unzip it first. - GPX: points become waypoints (
wpt, withele,nameanddesc), lines become tracks (trk) and a MultiLineString becomes one track with several segments. When reading, waypoints, routes (rte) and tracks are all converted, with the elevation as a third coordinate. GPX has no polygons, so polygon rings are written as track segments and a warning says so. - CSV: when every feature is a point, the output has
latitudeandlongitudecolumns (pluselevationif present) followed by one column per property. Mixed data gets awktcolumn instead. When reading, coordinate columns namedlat/latitude/yandlon/lng/long/longitude/xare recognised in any case, as well as awktorgeometrycolumn. A decimal comma such as46,8139is accepted. Rows without coordinates are skipped and counted. - WKT: one geometry per line. The reader accepts Z and M variants,
EMPTYgeometries and a PostGIS-styleSRID=4326;prefix. WKT has no attributes, so properties are dropped on output.
Tips and limits
- WKT and GeoJSON both write longitude first. If your points land in the ocean off Africa or at the wrong pole, the source probably had latitude and longitude swapped.
- The preview is a simple drawing without a base map, useful to spot swapped coordinates, stray points or unclosed shapes at a glance.
- Files up to 20 MB are accepted. Very large files may take a few seconds, since the text output is built in memory.
Frequently asked questions
How do I convert KML to GeoJSON?
Paste the KML or drop the .kml file, keep From on Detect automatically and choose GeoJSON under To. Placemark names, descriptions and extended data become feature properties.
Can I open a GPX track from my watch or bike computer?
Yes. Tracks with several segments become a MultiLineString, waypoints become points, and each point’s elevation is kept as the third coordinate. Timestamps of individual track points are not kept.
Why are my polygons tracks in the GPX file?
GPX only knows waypoints, routes and tracks. The outline of each polygon ring is written as a track segment so the shape is not lost, and the tool shows a warning.
What CSV layout does the tool expect?
A header row with a latitude and a longitude column, such as name,lat,lon. Commas, semicolons and tabs are all fine. Alternatively, provide a wkt column holding geometries like POINT (2.35 48.85).
Is my data sent to a server?
No. Parsing and conversion run entirely in your browser; the page makes no request with your data, which matters for private tracks and client location files.
Related tools
- Bounding Box Calculator Calculate the bounding box of coordinates, GeoJSON or WKT as minLon,minLat,maxLon,maxLat, WKT, Overpass or Leaflet, with padding and antimeridian support.
- Distance Between Coordinates Calculate the distance between two GPS coordinates with the haversine or Vincenty (WGS84) formula, plus bearing and midpoint, in km, miles and nautical miles.
- JSON Formatter and Validator Free JSON formatter and validator that beautifies, minifies and checks JSON in your browser, with syntax errors reported by line and column.