KML ⇄ GeoJSON Converter
Turn a KML placemark, line or polygon into GeoJSON, or write a GeoJSON feature collection out as a KML document, and see what each conversion keeps and what it leaves behind.
KML and GeoJSON both list positions as longitude first, then latitude, and an optional altitude third, so this conversion rewrites structure rather than reordering axes. A KML Placemark becomes a GeoJSON Feature: its name and description become properties, every ExtendedData Data or SchemaData SimpleData value is carried across as a string property, and its geometry becomes Point, LineString or Polygon. A MultiGeometry whose members share one type becomes MultiPoint, MultiLineString or MultiPolygon; a mixture becomes GeometryCollection, and a single member is unwrapped. A LinearRing outside a Polygon becomes a closed LineString, because GeoJSON has no ring geometry of its own, and a ring that is not closed has its first position repeated at the end so the GeoJSON ring is valid - each of those is reported as a warning. Going the other way, a Feature becomes a Placemark, name and description become elements, scalar properties become ExtendedData Data values, non-scalar properties are left out with a warning, null geometries become empty Placemarks, and GeometryCollection or any Multi type becomes MultiGeometry. Coordinates must hold two or three finite numbers with longitude within -180 to 180 and latitude within -90 to 90; polygon rings need at least four positions and must already be closed in GeoJSON. Folders, styles, styleUrl, time stamps, regions, NetworkLink, GroundOverlay, ScreenOverlay, Model and gx:Track are not geometry and are dropped, with a warning where they sat inside a MultiGeometry; KML comments, CDATA and character entities are read. Numbers are written as JavaScript's shortest exact form, so coordinates keep the precision you pasted. Everything is local: no upload, no storage, no network access.