KML to CSV (and CSV to KML)
Paste or open a KML file to get a CSV of its placemarks, or open a CSV with latitude and longitude columns to get a KML file.
KML to CSV is a free, browser-based converter that turns KML files, the map format used by Google Earth and many mapping apps, into CSV spreadsheet files. It also works in reverse, turning CSV files with latitude and longitude columns back into KML. Each KML placemark becomes one row, so names, descriptions, folders and coordinates land in separate columns you can sort, filter and check in a spreadsheet. In the other direction, each row with a valid latitude and longitude becomes one placemark, with the remaining columns kept as extended data.
The tool runs in your browser, and your file is not uploaded. You open a file or paste text, choose a direction, and download the result as name.csv or name.kml.

How to use the KML to CSV
- Choose a direction in the Direction list. It defaults to Detect from the text, which treats text starting with < as KML and anything else as CSV. Select KML to CSV or CSV to KML to force a direction.
- Add your data. Click Open file, drop a file onto the input box, or paste text. The box accepts .kml, .csv, .tsv and .txt files.
- If characters look wrong, check the Encoding list. It is set to Detect automatically by default.
- For KML to CSV, pick an option in Lines and polygons (KML to CSV). The default is One row per vertex.
- Set Delimiter (comma, semicolon, tab or pipe) and Line endings (CSV output) (CRLF or LF) to suit the program you will open the file in.
- Read the status line. It shows the counts and any skipped rows.
- Check the preview table under the result when converting KML to CSV, and use the three column lists when converting CSV to KML if the tool picked the wrong latitude, longitude or name column.
- Download the result as name.csv or name.kml.
To try the tool first, click Load example. Click Clear to empty the input. Your settings are stored in the page address as ?key=value, so a copied link reopens the same setup.
How do I convert KML to CSV?
KML to CSV writes one row for every Placemark. Columns come first from the folder, which lists the names of the Folders the placemark sits in joined with " / " (the top Document name is left out), then name, description, address and geometry (Point, LineString or Polygon). Latitude, longitude and altitude follow. A part column appears only when one placemark holds several shapes, such as a MultiGeometry, and a vertex column appears only when the file has lines or polygons.
Any custom field stored in ExtendedData, whether as Data name/value pairs or SchemaData SimpleData, becomes an extra column. Descriptions often contain HTML, so the option Remove HTML tags from descriptions is on by default. It turns
and paragraph ends into spaces, removes the other tags, and decodes entities such as & and , so each cell reads as plain text.
The built-in example holds three placemarks, and the tool turns them into five rows and ten columns. The Blue Door Cafe, for instance, becomes one row with the folder San Francisco and a rating column set to 5.
A line or polygon can have hundreds of vertices, so the default One row per vertex can make a long CSV. Choose One row with the first vertex or Leave them out (points only) when you only need the places.
Why is longitude first in KML?
KML stores each coordinate as longitude,latitude,altitude, with longitude first. Separate points are joined by spaces, and no spaces appear inside a single point. This is the order the format requires, so any KML you open keeps it.
The CSV that the tool writes reverses this and lists latitude before longitude, because most spreadsheets and mapping tools list them that way. The status line notes the change. Keep the ranges in mind when you check values: longitude runs from -180 to 180, and latitude runs from -90 to 90. A latitude value such as 122.4 is outside its range and points to swapped columns.
Frequently asked questions
How do I convert a CSV to KML?
Set Direction to CSV to KML, or leave it on Detect from the text, then open or paste your CSV. The first row must be the header row. The tool fills the three column lists from that header, and you can change any choice by hand.
Which columns does CSV to KML need?
You need a latitude column and a longitude column. The tool recognises names such as latitude, lat or y, and longitude, lon, lng, long or x. A name column is picked from headers such as name, title, label, place, location, site or city, and altitude from altitude, alt or elevation.
What happens to lines and polygons?
In KML to CSV, the Lines and polygons option decides the result. One row per vertex is the default, One row with the first vertex keeps one row per shape, and Leave them out (points only) removes them. Points always get one row, and a placemark without geometry still gets a row with empty coordinates.
Can I convert a KMZ file?
Not directly. A KMZ is a zipped KML file, and the tool reads only plain .kml. If you open a KMZ, the tool tells you to unzip it and open the .kml inside, usually named doc.kml.
Why were some rows skipped?
Rows are skipped when the latitude or longitude is not a plain decimal number or falls outside its valid range. The status line lists the first affected row numbers, where row 1 is the header. Decimal commas such as 37,77 are not accepted, so use a period. If every latitude is above 90 but the longitudes fit, the two columns may be swapped.
Is my file uploaded anywhere?
No. The page says the tool runs in your browser and your file is not uploaded. The output files are yours to use anywhere, including commercially, and no credit is needed.
Related tools
- CSV to JSON: use it when you need the same table as JSON for a web app or script.
- XML to CSV: use it when your source data is XML rather than KML.
- CSV converter: use it to change the delimiter or encoding of a CSV file.
- CSV to XML: use it to turn a CSV table into plain XML.
- CSV editor: use it to check and fix the latitude and longitude values before converting.
- CSV validator: use it to check that a CSV is well formed.