KML to CSV Converter

Extract KML Placemark coordinates and names to a flat CSV

Ad placeholder (leaderboard)

A KML to CSV converter flattens a Google Earth file back into a spreadsheet. KML stores locations as XML Placemark elements with nested folders and longitude,latitude,altitude coordinate tuples, which is hard to read in a text editor. This tool extracts the names, descriptions, folders, and coordinates into clean CSV rows you can open in Excel, Google Sheets, or any analytics tool — all in your browser.

How it works

The converter parses your KML with the browser’s native DOMParser, which validates that the XML is well-formed. It then iterates over every Placemark element. For each one it reads the direct child name and description, and walks up the parent chain to find the nearest enclosing Folder so the original grouping is preserved.

Coordinates live inside one or more coordinates elements. A single element can hold many whitespace-separated tuples, and each tuple is longitude,latitude with an optional altitude. The tool splits these correctly, swaps the order to the more familiar latitude, longitude, and emits one CSV row per point. That means a MultiGeometry placemark or a polygon’s vertex list produces multiple rows rather than being silently dropped.

Output and notes

The CSV header is name, folder, lat, lon, alt, description (the folder column is optional). Any cell containing a comma, quote, or newline is wrapped in double quotes with internal quotes doubled, following RFC 4180, so the file imports cleanly. Because the parsing happens entirely client-side, the tool works offline and never transmits your location data.

Ad placeholder (rectangle)