Convert KML to CSV online
A practical look at converting KML to CSV online: what survives the conversion, what gets flattened or lost, and how to check the result before you rely on it.
Turning a KML file into a CSV is a structural conversion. It takes nested, map-oriented XML and flattens it into rows and columns that a spreadsheet or database can read. An online KML to CSV converter can do this in seconds, but how useful the output is depends on what your KML contains and what you plan to do with the table. This review covers how the conversion works, where it loses information, and how to judge whether the result fits your use.
Scope note: no specific converter was tested for this article, and no tool-specific features, limits, prices or privacy practices are described. The guidance below rests on how the KML and CSV formats are defined and on general behavior of spreadsheet software. Treat it as a checklist to apply to any tool you are considering.
Is converting KML to CSV right for your purpose?
Conversion is a good fit when you mainly need point locations and their attributes in tabular form. Examples include sorting placemarks by name, joining locations to other records, counting features, or importing coordinates into a system that accepts latitude and longitude columns. The main benefit is that the data becomes easy to read, filter and edit in ordinary tools.
The key tradeoff is that CSV has no built-in notion of geometry, styling or hierarchy. Lines and polygons must be squeezed into a single text cell or reduced to individual vertices. Icons, colors, folder structure and display settings are usually dropped. If you need the file to look and behave the same on a map afterward, a CSV is the wrong destination.
Keep the original KML, or choose a geometry-aware format instead, when:
- Your file is mostly lines or polygons and you need to edit or measure their shapes.
- Folder organization, styles or labels carry meaning you must keep.
- You need to send the data back to a mapping application without rebuilding it.
- The data includes time spans, network links or overlays that have no sensible place in a flat table.
What the conversion actually changes
KML is an XML format. Each map feature is usually a Placemark containing a name, an optional description, optional extended data fields, and a geometry such as a Point, LineString or Polygon. Placemarks can sit inside Folders and Documents, and they can refer to shared styles. CSV is plain text: one header row, then one row per record, with fields separated by a delimiter. A converter reads the XML tree, picks out values and writes them as columns. The stored data changes, not just its appearance. Elements without a column mapping simply disappear from the output.
An illustrative input placemark (sample values, not real data):
<Placemark>
<name>Trailhead, North Lot</name>
<description>Parking & restrooms</description>
<Point>
<coordinates>-122.0840,37.4220,0</coordinates>
</Point>
</Placemark>
A typical CSV result for that placemark:
name,description,longitude,latitude,altitude
"Trailhead, North Lot",Parking & restrooms,-122.0840,37.4220,0
Three changes show up even in this small example. The XML entity & becomes a literal ampersand. The name is wrapped in quotes because it contains a comma, which would otherwise split it into two columns. And the single coordinates string is split into separate numeric fields. KML writes coordinates as longitude, latitude, then optional altitude. Many CSV consumers expect latitude first, so check the column headers instead of assuming the order.
Converters handle KML elements in different ways. The table below shows common outcomes. Your tool may differ, so confirm against its documentation or a test file.
| KML content | Common CSV outcome | What to check |
| Point coordinates | Separate longitude, latitude and possibly altitude columns | Column order and whether altitude is kept |
| LineString or Polygon | One WKT text cell (for example POLYGON ((...))), one row per vertex, or skipped | Whether shapes are preserved, exploded or silently dropped |
| MultiGeometry | Merged into one cell, split into several rows, or reduced to a single part | Whether all parts appear |
| name and description | Text columns; HTML in descriptions may be kept as raw markup | Stray tags, line breaks inside cells |
| ExtendedData fields | Extra columns, if the tool reads them | Whether custom attributes appear at all |
| Folders and Documents | Flattened; folder name sometimes added as a column | Whether grouping information survives |
| Styles, icons, colors | Usually dropped | Whether you need them downstream |
| TimeStamp or TimeSpan | Text column or dropped | Date format and time zone handling |
When a polygon is stored as Well-Known Text, the cell lists x y pairs, meaning longitude then latitude, separated by spaces, with the first point repeated to close the ring. For example: POLYGON ((-122.09 37.42, -122.08 37.42, -122.08 37.43, -122.09 37.42)). Spreadsheets treat this as an ordinary string. It is only useful as geometry when you import it into software that parses WKT.
Some files arrive as KMZ rather than KML. A KMZ is a zipped package that usually contains a KML file plus images. A converter that accepts only plain KML will need you to extract the KML first. Images and other bundled resources do not carry over to CSV.
Will the CSV stay readable and usable after you open, copy or share it?
CSV is plain text, so it opens almost anywhere. Its looseness also brings practical risks:
- Delimiters and locale: in regions where the comma is the decimal separator, some spreadsheet setups expect semicolons between fields. A comma-delimited file may then open as a single column, or coordinates may be misread.
- Automatic formatting: spreadsheet applications may reformat values when opening a file. They can trim trailing zeros, switch to scientific notation, or turn text that looks like a date into a date. Re-saving can make those changes permanent. Importing with columns set to text avoids this.
- Character encoding: KML is normally UTF-8, but CSV has no required encoding. Place names with accented or non-Latin characters can display incorrectly if the file is opened under a different encoding.
- Multi-line cells: descriptions with line breaks are valid in quoted CSV fields, but some tools and copy-paste paths split them into extra rows.
- Precision: check that the converter has not rounded coordinates. Losing decimal places moves points on the map.
On accessibility, a converted table is often easier to navigate than a map. Rows and columns can be read cell by cell in a spreadsheet, while a map layer usually conveys location visually. The weak points are long WKT strings and raw HTML left in descriptions, which are hard to read aloud or scan. How a particular screen reader handles a particular spreadsheet was not tested here. Check that combination directly if it matters for your audience.
For search and editing, the CSV is easier to filter, find and change than nested XML. The tradeoff is that edits made in the table do not flow back into the original KML. Converting the CSV back to KML will not restore styles, folders or any geometry that was simplified.
Privacy and handling of uploaded files
Using an online converter usually means uploading your file to someone else's server. KML files can contain sensitive locations, such as home addresses, field survey sites or asset positions. No evidence was available about any specific service's retention or processing practices, and a tool's design or marketing language does not establish them. Read the service's stated policy before uploading. For sensitive data, consider converting locally.
One local option is GDAL's ogr2ogr command-line utility. It can write KML geometry to CSV as WKT or as coordinate columns through a layer creation option. Option names and multi-layer behavior can vary by version, so check the CSV driver documentation for the release you have installed.
ogr2ogr -f CSV output.csv input.kml -lco GEOMETRY=AS_WKT
ogr2ogr -f CSV points.csv input.kml -lco GEOMETRY=AS_XY
If the KML contains several folders or layers, the output may be split into separate files instead of one CSV.
A quick check before you rely on the output
- Compare the row count with the number of placemarks you expect.
- Open one known feature in both files and confirm its name, attributes and coordinates match.
- Confirm which column holds latitude and which holds longitude.
- Check whether lines, polygons and multi-part features were kept, exploded or dropped.
- Look for leftover HTML, broken accented characters and split rows.
- Import into a spreadsheet with columns set to text if you need to preserve exact values.
Gaps in this review
No online KML to CSV tool was tested for this article. There are no measurements of speed, file size limits, accuracy or accessibility for any named service, and no information about any provider's privacy practices. The behaviors described come from the formats themselves and from general spreadsheet behavior. Confirm them with a small test file in the tool and destination you actually plan to use.