All converters
HomeBlog › How to convert CSV or Excel coordinates to Google Earth (KML)

How to convert CSV or Excel coordinates to Google Earth (KML)

By Ghulam Hasnain · PhD researcher, Space Science & Technology · · Updated · 5 min read

A spreadsheet of coordinates is just a table until you map it. So this guide shows how to convert CSV to KML, and Excel too, for Google Earth. It is free. Also, it runs in your browser, so nothing is uploaded.

Advertisement

What your spreadsheet needs first

Before you convert CSV to KML, you need two columns. One holds latitude. The other holds longitude. They can be named lat and lon, or latitude and longitude, or y and x. So common headings are detected for you. Any other columns become the placemark's details.

Convert CSV to KML: latitude and longitude columns become Google Earth placemarks
When you convert CSV to KML, each row's latitude and longitude become one Google Earth placemark.

A tiny working example

A sheet this simple is enough. Use a header row of name,lat,lon. Then add one row per place. For example, Eiffel Tower,48.8584,2.2945. Everything else is optional. So you can add an ID, a category, or a date, and they ride along as attributes.

Which coordinate formats work

Decimal degrees is the safest format. For example, 48.8584 and 2.2945. Degrees, minutes and seconds also appear on GPS units. However, mixing formats in one column loses rows. So use the coordinate converter first if needed.

How to convert CSV to KML, step by step

  1. Open the Spreadsheet to map tool. Then drop your CSV or Excel file.
  2. Check the Longitude and Latitude menus. The tool picks them for you, but confirm they are right.
  3. Watch the map preview. So your points should land in the right country.
  4. Finally, choose KML or KMZ and click Convert. Then open the file in Google Earth.

Prepare the file so it converts cleanly

Three habits save most of the pain. First, make sure row 1 is a real header. Next, delete any total rows at the bottom, because they have no coordinates. Finally, store the coordinate columns as numbers, not text.

Avoid the classic swapped lat and lon

The most common mistake is simple. People put longitude where latitude belongs. Latitude runs from minus 90 to 90. Longitude runs from minus 180 to 180. So if your points land in the wrong hemisphere, swap the two columns. The live preview makes this obvious before you download.

A quick way to tell them apart

Use the range test. Any value above 90 must be a longitude, because latitude cannot exceed 90. For example, 120.5 is a longitude. Also, remember the signs. Negative latitude means south. Negative longitude means west.

Why KML confuses people

Inside a KML file, coordinates are written longitude first. So the order is the reverse of how people say it. If you hand-edit KML, this catches almost everyone once. However, the converter handles the order for you.

Pick KML or KMZ for Google Earth

Both open in Google Earth. So you can convert CSV to KML, then open the result in seconds. Choose KML for a plain, editable text file. Alternatively, choose KMZ for a smaller file that is easy to email. The same tool also writes GeoJSON, Shapefile and GPX. You can read more about the format at the Google KML documentation.

Get the labels and popups you want

Google Earth uses the name column for the on-screen label. So put your label text there. Every other column then shows up in the popup. However, keep names short, because long labels overlap when points sit close together.

Handle bigger spreadsheets

You can convert CSV to KML for large sheets too. A few hundred rows convert instantly. Several thousand still work well. However, Google Earth slows down when it draws tens of thousands of labels at once. So split a very large file by region or category. Then you can toggle each layer on and off.

Rows that quietly disappear

Sometimes the output has fewer placemarks than your sheet. Almost always, those rows had a blank or non-numeric coordinate. So sort by the latitude column. Then check the top and bottom, because stray text usually clusters there.

Keep sensitive data private

Address lists and site coordinates are often sensitive. However, this conversion happens in your browser. So the spreadsheet is never uploaded. As a result, nothing leaves your computer.

Why that matters

Customer addresses and survey points end up in spreadsheets every day. Uploading them can breach a client agreement. Also, once a file is sent, you cannot unsend it. So local conversion avoids the question entirely. In short, you can convert CSV to KML without handing your data to a stranger.

Frequently asked questions

How do I convert an Excel file to KML for Google Earth?

Drop the .xlsx into a spreadsheet-to-map converter, confirm which columns hold latitude and longitude, then export as KML or KMZ and open the file in Google Earth. No add-in or install is required, and a browser-based converter keeps the spreadsheet on your own machine.

What columns does my spreadsheet need for KML?

At minimum a latitude column and a longitude column in decimal degrees. A column called 'name' becomes the placemark label in Google Earth, and any remaining columns appear as attributes in the popup balloon.

Why are all my points in the ocean near Africa?

Coordinates of 0,0 place a point off the coast of West Africa, nicknamed Null Island. It means the latitude and longitude values were blank, zero or not recognised as numbers. Check that the correct columns are selected and that they are stored as numbers rather than text.

Can Google Earth open a CSV file directly?

Google Earth Pro can import a delimited text file, but the wizard is fiddly and does not handle Excel files, mixed coordinate formats or projected coordinates well. Converting to KML first gives you a cleaner result and a file you can share.

How do I convert UTM easting and northing to Google Earth?

Google Earth only reads WGS84 latitude and longitude, so projected metres must be reprojected first. Tell the converter which coordinate system the values are in (for example EPSG:32631 for UTM zone 31N) and it will convert them to lat/long during the export.

Is there a row limit when converting a spreadsheet to KML?

The conversion itself handles large files comfortably, but Google Earth becomes sluggish when drawing tens of thousands of labelled placemarks. For very large datasets, split the data into several themed layers you can switch on and off.

Related converters

Keep reading

About the author

Ghulam Hasnain is a PhD researcher in space science and technology who works with GIS and remote-sensing data every day, wrangling shapefiles, KML, GPX and CAD drawings across QGIS, ArcGIS and Google Earth. He built GISConverter after one too many format conversions that required uploading sensitive survey data to a stranger's server.

Advertisement