CSV to KML Converter: Spreadsheet into Google Earth

All tools
Report

Heading to the field? Install this site from your browser menu and this tool works with no signal. See how

Converter

Nothing is uploaded. The file is converted on your own device, so it works with no signal.

Drop a file here or

Nothing leaves your device.

No file to hand?

Waiting for a file.

Features in this file

NameTypeFolderVerticesLengthArea

A diagram showing a spreadsheet row with columns for name, latitude, longitude, depth and contractor, holding BH-01, 37.00, minus 109.05, 45.5 and Ridgeway. Arrows lead down to a single Placemark. The name column becomes the placemark name, the label seen on the map. The latitude and longitude columns become the Point. Everything else becomes ExtendedData on the placemark. A band explains that ExtendedData is what appears in the balloon when somebody clicks a point in Google Earth, which is the difference between a map of dots and a map somebody can interrogate.
The two teal columns become geometry and the rest become the balloon. Counting them is the quickest way to confirm a conversion dropped nothing.

How to use this tool

Drop a .csv file above. The delimiter is detected automatically, so comma, semicolon and tab separated files all work without you telling it which you have. Coordinate columns are found by name, everything is drawn on the map so you can check it, and then Convert to KML gives you a file that opens in Google Earth by double clicking.

If your data is in an .xlsx rather than a .csv, the Excel to Map reads spreadsheets directly and shows the same map.

What one row becomes

Every row turns into a single Placemark, and each column has somewhere specific to go.

A column called name becomes the placemark name, which is the label you see on the map and in the sidebar. The latitude and longitude columns become the Point. Every remaining column becomes ExtendedData attached to that placemark.

That last part is the one worth caring about. ExtendedData is what Google Earth shows in the balloon when somebody clicks a point. A depth, a contractor, a date, a status, an asset number. It is the difference between sending somebody a map of anonymous dots and sending them something they can interrogate by clicking.

A worked check you can repeat on paper

Load the sample and convert it, then open the resulting file in a text editor. The sample has five columns: name, latitude, longitude, depth and contractor.

Find the first Placemark. You should see, in order: a name element containing BH-01, an ExtendedData block, and a Point element containing minus 109.05 comma 37.00.

  • Count the Data elements inside the ExtendedData block. There should be two: depth and contractor.
  • Five columns in, and two of them became the Point and one became the name. Five minus three is two.
  • Notice the Point coordinates are written longitude first, which is the reverse of the column order in your spreadsheet. KML is defined that way.

That arithmetic is the quickest way to confirm nothing was dropped. If your spreadsheet had twelve columns and the balloon shows eight fields, three went to geometry and the name, and one was empty in that row, because empty cells are skipped rather than written as blanks.

Getting the delimiter right

A file with a .csv extension is not necessarily comma separated. Excel in much of Europe writes semicolons, because the comma is the decimal separator there. Databases often produce tabs. This tool counts the candidates in the first line, ignoring anything inside quotes, and picks the most frequent.

Quoting is handled properly as well. A field wrapped in quotes may contain commas, line breaks and doubled quote marks, and all three appear in real address and description columns. A reader that splits on commas mangles every one of them, which is why a name like Smith, John so often ends up shifting an entire row one column to the left.

Mistakes that catch people out

Latitude and longitude the wrong way round. The most common error by a distance, and the range check catches it because a latitude beyond 90 does not exist.

Long column names. They travel with the data, and if it ever becomes a shapefile the .dbf caps names at ten characters. Naming a column depth_m now avoids measured_depth_m becoming measured_d later.

Expecting styling. A CSV has no colours and neither does the output. If you want your points classified by colour in Google Earth, set it there after importing, or write the class into a column and style by it.

Empty coordinate cells. Rows without usable numbers are skipped, and the count of skipped rows is reported above. If that number is not zero and you expected it to be, there are gaps in your data.

Assuming a big file is a problem. The parsing is done in your browser and handles tens of thousands of rows comfortably. Nothing is uploaded, so file size is limited by your machine rather than by anybody upload cap.

Related Calculators and Reference

A spreadsheet becoming a map is usually part of a loop rather than a one way trip.