Convert CSV to KML
What converting a CSV or TSV file to KML changes, what can go wrong with coordinates, columns and special characters, and when to keep plain tabular data instead.
Converting a CSV file to KML takes rows of location data and rewrites them as map features. Each row becomes a placemark that mapping software can display. The conversion is useful when you need points on a map. It is not a neutral copy of your data: columns are restructured, some are dropped, and coordinate handling can quietly go wrong. This review covers what the conversion does, where it loses or distorts information, and when the original table is the better format to keep or share.
Evidence note: no specific converter was tested for this article, and no measured file-size limits, processing times or tool-specific behaviors are reported here. The guidance below relies on the general structure of the CSV and KML formats. Behavior of any particular CSV to KML converter should be checked against that tool's own documentation or a small test file.
Is CSV to KML conversion suitable for your use?
The conversion fits when three things are true: your rows describe point locations, you have or can reliably obtain latitude and longitude for each row, and the goal is to view or share those points in a map or globe application that reads KML. The main benefit is portability. KML (Keyhole Markup Language) is an XML-based format published as an Open Geospatial Consortium standard and read by many mapping and GIS applications, so one file can carry both locations and short descriptions.
The main tradeoff is that KML is a presentation-oriented geographic format, not a data table. Spreadsheet-style columns usually end up as a name, a description, or extended data fields whose display varies between applications. Sorting, filtering, recalculating and bulk editing are all easier in the original table.
Keep plain CSV or TSV, or share it alongside the KML, when:
- The audience needs to read, sort or analyze values rather than see them on a map.
- The data will keep changing and must be edited regularly.
- Rows hold addresses but no coordinates, and you have no reliable way to geocode them.
- The locations are sensitive, such as homes, clients or staff, and a map would make them easier to identify and pass around.
- The features are routes or areas rather than single points. A simple row-per-point conversion does not build lines or polygons, so check whether the tool supports them.
What the conversion actually changes
This is a structural change to the stored data, not a visual effect. A CSV file is delimited text: one record per line, with fields separated by commas, or by tabs in a TSV file. A KML file is XML. The converter reads each record, chooses which fields become the placemark name and description, takes the coordinate fields, and writes them as nested elements. The map display you eventually see is drawn by the viewing application from those elements. The KML file itself contains no rendered map.
A minimal illustration with two rows of input:
name,latitude,longitude,description
Depot A,40.7128,-74.0060,Main warehouse
Depot B,34.0522,-118.2437,"West coast, overflow"
A typical point-placemark result is shown below. The namespace declaration a converter writes on the root element is omitted here. A real file normally declares the KML 2.2 namespace there.
<?xml version="1.0" encoding="UTF-8"?>
<kml>
<Document>
<Placemark>
<name>Depot A</name>
<description>Main warehouse</description>
<Point>
<coordinates>-74.0060,40.7128</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Depot B</name>
<description>West coast, overflow</description>
<Point>
<coordinates>-118.2437,34.0522</coordinates>
</Point>
</Placemark>
</Document>
</kml>
Three changes in this example matter:
- Coordinate order flips. KML writes longitude first, then latitude, with optional altitude. Most spreadsheets list latitude first.
- The quoted field "West coast, overflow" is unwrapped. The quotes in the CSV only protected the comma inside the value, so they are removed and the comma becomes part of the text.
- The header row disappears as a row. It is used to map columns to roles.
Common ways meaning gets lost or distorted
| Issue | What happens | What to check |
| Swapped latitude and longitude | Points land in the wrong hemisphere or fail to load | Spot-check a few known locations after conversion |
| Coordinate format | KML expects decimal degrees on the WGS84 datum. Degrees-minutes-seconds or projected coordinates need converting first | Confirm the source format before converting |
| Decimal commas | Values like 40,7128 can be misread as two fields in a comma-delimited file | Use period decimals, or a tab or semicolon delimiter the tool accepts |
| Unquoted commas in text | Fields shift and values land in the wrong columns | Validate the CSV parses into the expected number of columns |
| Special characters | &, < and > must be escaped in XML. Unescaped characters can make the file invalid | Open the output in a viewer, or check that it parses as XML |
| Character encoding | Non-UTF-8 input can turn accented or non-Latin text into garbled characters | Save the source as UTF-8 before converting |
| Dropped columns | Fields not mapped to name, description or extended data may be discarded | Compare the output fields with the source header |
If your file has addresses instead of coordinates, a converter that accepts addresses must geocode them, which is a separate step. Geocoding can place ambiguous or incomplete addresses in the wrong spot, and the result depends on the geocoding service used. Treat geocoded points as estimates until you have verified them.
Will the result stay readable and usable after sharing?
A KML file is plain text, so it survives copying, emailing and version control better than a binary format. Its readability depends on the viewing application. Descriptions may be displayed as plain text or interpreted as HTML. Extended data fields may appear in a balloon or table, or may not appear at all. Styles and icons may render differently. One application showing the file correctly does not mean others will. If the file is going to a specific destination, test it there with a small sample. KMZ is a zipped form of KML. Some destinations accept only one of the two formats.
Accessibility deserves separate attention. A map is a visual presentation, and no assistive technology was tested for this review. Screen reader access to placemarks depends entirely on the viewing application and was not verified here. When people need to use the information without a map, provide the original table or a plain-text list of names, locations and descriptions. Do the same when the data must be searched, cited or edited.
Editing is another limit. Small fixes can be made in a text editor, but each change must stay valid XML and keep the longitude-first coordinate order. For anything beyond minor corrections, it is usually safer to edit the CSV and convert it again.
Privacy when using an online converter
Location data can identify people and places. An online CSV to KML converter may upload your file for processing. A tool's design or wording such as "secure" or "private" is not evidence of how it stores or deletes data. Read the tool's documented data-handling policy. If none exists, or the data is sensitive, use a converter that runs locally or remove identifying columns before uploading.
Bottom line
Converting a CSV file to KML is the right step when you have point coordinates and need them on a map in software that reads KML. It preserves locations and short labels well, but only if coordinate order, number format, encoding and special characters are handled correctly. Check those things on a small sample first. It handles tabular detail less reliably, and it is a poor substitute for the table when people need to analyze, edit or access the data without a map. Keep the source CSV or TSV as the master copy and treat the KML as a display format generated from it.