KML to CSV Converter

Convert a KML or KMZ file to a CSV table that opens in Excel, with the name, latitude, longitude and data fields of every point as columns, without uploading the file.

How to convert KML to CSV

  1. Add the KML or KMZ file

    Drop it on the map above or press Choose a file; a KMZ works as it is, and so does a GPX or GeoJSON file.

  2. Check the table

    The rows appear in a data table under the map, as they will be in the CSV, 100 at a time with a Show more rows button. The table follows the tick boxes: untick folders you want to leave out.

  3. Download the CSV

    Press Download CSV.

  4. Open it in Excel

    Open the CSV file in Excel. The file is saved as UTF-8 with a byte order mark, so accented letters and other alphabets show correctly.

What KML files hold and how to open them in Google Earth: how to open a KML or KMZ file.

Which columns the CSV has

The columns are name, latitude, longitude, altitude and description, the description as plain text, then one column for every data field in the file. Latitude and longitude are separate columns in decimal degrees, the layout Google Earth and Google My Maps read from a CSV. KML itself writes longitude first, so numbers copied by hand from the KML text come in the other order.

Data fields are the values a placemark carries in its ExtendedData, either as named values or as typed fields declared in a Schema. Each field name becomes a column, and a placemark without that field gets an empty cell, as does the altitude of a point that has none. A time stamp that the file gives a placemark becomes a column too (timestamp in a KML file, time for a GPX waypoint).

One row for each point and each vertex

A placemark point gives one row. A path gives one row for each of its vertices, in order, so a path with 120 points becomes 120 rows with the same name, and a polygon gives one row for each vertex of its outline and of each hole. No column gives the kind of shape or the number of the vertex.

KML to Excel

There is no .xlsx download: the converter makes a CSV file, and Excel opens CSV files. Microsoft's help says a UTF-8 CSV opens normally in Excel if it was saved with a byte order mark, which this one is, and gives Get Data steps for a file saved without one. A cell that starts with =, +, -, @ or a tab and is not a number gets an apostrophe in front of it, so that Excel does not read it as a formula.

Use the CSV in Google My Maps or Google Earth

Google My Maps imports a CSV with a latitude and longitude column, up to 2,000 rows. Google Earth on the web imports CSV as an experimental feature, from separate latitude and longitude columns in signed decimal degrees, and keeps the other columns as attributes. Both also import the KML file itself, which keeps its paths and polygons as shapes rather than rows of points.

The coordinates of one placemark

For a single placemark, open it and press Copy coordinates in its details. It copies one position per line, as longitude, latitude and, when the file has one, altitude, separated by commas: the KML order, longitude first. The details of a point also show its position under Latitude, longitude, latitude first.

Your file is not uploaded

The table is built in your browser and the KML file never leaves your device, whatever its placemarks hold. Google Analytics, which counts visits, learns that a CSV was saved and never receives a row of it.

Frequently asked questions

Can I convert KML to CSV?

Yes. Add the KML or KMZ file to this page and press Download CSV.

Can I open a KML file in Excel?

Convert it to CSV here and open the CSV in Excel. Each point, and each vertex of a path or polygon, becomes a row with its name, latitude, longitude and data fields.

How do I convert KMZ to CSV?

Add the KMZ file without unzipping it. Its KML is read from inside the archive, and each point and vertex becomes a row.

How do I export coordinates from a KML file?

Download the CSV for every coordinate in the file, or open one placemark and use Copy coordinates.

Why does one path have many rows?

Each vertex of a path is its own row, in order along the path, so you get every coordinate on it.

Which comes first, latitude or longitude?

In the CSV, latitude comes first, in its own column. In the KML text it is the other way round: longitude, then latitude.

Does it make an .xlsx file?

No. It makes a CSV file, which Excel opens.

Is my file uploaded?

No. The CSV is made in your browser and the file never leaves your device. Google Analytics never receives the file, its rows or its coordinates.