KML to CSV converter
Get the places from a Google Earth or Google My Maps file as a spreadsheet: one row per placemark, with latitude, longitude and every field. Opens in Excel and Google Sheets. Free, and no account needed.
Convert KML to CSV online, in your browser
The Spatibase KML to CSV converter turns a KML or KMZ file into a CSV table in your web browser. What you get:
- One row per placemark. Each row holds the
name, thedescriptionas plain text, thefolder, every ExtendedData field,latitudeandlongitudefor points, and awktcolumn with the shape of every point, line and area. - Made for spreadsheets. The file is UTF-8 with a byte order mark, so Excel shows accents correctly, and styles and icons are left out.
- Never uploaded. Your file is read on your computer. Files up to 50 MB work, with no account.
How to convert KML to CSV
- Export the map. In Google My Maps, use the menu next to the map’s title → Export to KML/KMZ (pick one layer or the whole map). In Google Earth Pro, right-click a folder in Places → Save Place As.
- Drop the .kml or .kmz on the box above, or press Choose a file.
- Look over the map and the list under it: each place there becomes a row in the CSV.
- Press Download CSV.
- Open it in Excel with a double-click, or in Google Sheets with File → Import → Upload.
Which KML data ends up in the CSV
| What | What happens |
|---|---|
| Placemarks | One row each, from every folder, in the order of the file. |
| Name | The name column, first in the table. |
| Description | The description column, as plain text. HTML tags are removed; line breaks stay inside the cell. |
| Folder | The folder column. Nested folders read like Trip / Day 2. |
| ExtendedData fields | One column per field. A placemark without that field gets an empty cell. |
| Point coordinates | latitude and longitude columns in decimal degrees, latitude first. |
| Lines and areas | Their full shape in the wkt column, such as LINESTRING (2.17 41.38, 2.18 41.37). Their latitude and longitude cells stay empty. |
| Altitude | Dropped. The WKT holds longitude and latitude only. |
| Styles, icons, overlays | Left out. Image overlays and network links are counted in the notes. |
From KML to a spreadsheet: latitude, longitude and WKT
KML hides the coordinates in one tag. Inside a KML, a pin is stored as 2.174356,41.403629,0: longitude, latitude and altitude in a single <coordinates> text. Copying that into a sheet by hand means splitting it and swapping the order.
The CSV splits them for you:
- Points get two columns. A
latitudeand alongitude, latitude first, the way Google Maps and most people write them. You can sort, filter or paste them into another tool. - Lines and areas go into wkt. A path or a boundary doesn’t fit in two columns, so its shape is written as WKT (Well-Known Text). QGIS, PostGIS, BigQuery and Google My Maps can turn that column back into shapes.
- Everything in one file. Folders don’t split the output: all placemarks land in one table, and the
foldercolumn tells you where each came from. Filter on it to get one folder.
Excel shows one column? Excel set to a European language expects semicolons. Open the CSV with Data → From Text/CSV instead and choose Comma as the delimiter.
Convert KML to CSV with ogr2ogr
With GDAL installed (QGIS includes it), one command writes the CSV. The GEOMETRY option decides how the location is stored:
# points: X (longitude) and Y (latitude) columns
ogr2ogr -f CSV out/ places.kml -lco GEOMETRY=AS_XY
# any shape: a WKT column
ogr2ogr -f CSV out/ places.kml -lco GEOMETRY=AS_WKTHow the result differs from this page: ogr2ogr writes one CSV per KML folder, puts longitude (X) before latitude (Y), keeps descriptions as HTML and adds KML settings such as tessellate and visibility as columns.
In JavaScript, @tmcw/togeojson reads the KML into GeoJSON; each feature’s properties plus its coordinates then make one row.
Questions about converting KML to CSV
How do I get the coordinates from a KML file into Excel?
Convert it here and open the CSV. Every point has its own latitude and longitude columns in decimal degrees, next to its name, description and fields. Lines and areas have their shape in the wkt column instead.
Can Excel open a KML file directly?
Only as raw XML. Excel can load a .kml as an XML table, but the coordinates stay one text value per placemark, with longitude, latitude and altitude run together. A CSV from this page gives clean latitude and longitude columns.
Why are latitude and longitude empty for some rows?
Those rows are lines or areas, which have many coordinates rather than one. Their whole shape is in the wkt column, which QGIS, PostGIS and Google My Maps can read.
How do I export Google My Maps to Excel?
My Maps exports KML or KMZ, not spreadsheets. Use Export to KML/KMZ from the map’s menu, drop the file here and press Download CSV. The columns you imported into My Maps come back as columns.
Does it convert KMZ files to CSV too?
Yes. A KMZ is a zipped KML, and the converter unzips it first. Photos and icons inside the KMZ are not part of the CSV.
Is my KML sent to a server?
No. The conversion runs in your browser, on your computer, and the file is never uploaded to Spatibase or anyone else. Only the background map loads from the internet.
Moving the places into Spatibase? Read how to import your data. Need another pair of formats? The GIS file converter converts between all of them.