Shapefile to KML converter

Turn a shapefile into KML for Google Earth. Drop the zip or the .shp, .dbf and .prj files; common coordinate systems such as UTM are converted to latitude and longitude.

Questions

How it works

  1. Drop the zipped shapefile, or pick the .shp, .dbf and .prj files together.
  2. The shapes are converted to latitude and longitude and drawn on the map.
  3. Download the KML and open it in Google Earth or any app that reads KML.

Runs in your browser. Files are never uploaded.

Input and output

Input
A zipped shapefile, or the .shp file picked together with its .dbf, .prj and .cpg.
Output
A .kml file in WGS84 latitude and longitude, with every attribute written as text.

Example: input

plots.zip: plots.shp, plots.shx, plots.dbf, plots.prj (WGS84) and plots.cpg, holding one polygon with name = Plot 2, commodity = coffee and area_ha = 8.6.

Example: output

plots.kml, with this placemark:
<Placemark><name>Plot 2</name><ExtendedData><Data name="commodity"><value>coffee</value></Data><Data name="area_ha"><value>8.6</value></Data></ExtendedData><Polygon><outerBoundaryIs><LinearRing><coordinates>-84.528637,9.986941 -84.52898,9.987532 -84.530697,9.987955 -84.53207,9.986771 -84.531813,9.985165 -84.529152,9.985419 -84.528637,9.986941</coordinates></LinearRing></outerBoundaryIs></Polygon></Placemark>

Limits

  • The .shp is required. Without the .dbf there are no attributes. Without the .prj, coordinates that look like degrees are read as WGS84 latitude and longitude, and others are refused until you add it.
  • A coordinate system it can't read is refused rather than guessed. An older local datum (such as Arc 1960 or PSAD56) without its shift to WGS84 can leave shapes a few hundred metres off, and the page warns about it.
  • Without a .cpg file, text that isn't UTF-8 is read as Windows-1252 (Latin).
  • The KML uses Google Earth's default colours.

Which shapefile files do I need?

The .shp file holds the shapes and is required. Add the .dbf to keep the attributes and the .prj so the converter knows the coordinate system. A zip with all of them works too.

My shapefile is in UTM. Does that work?

Yes, as long as the .prj file is included. KML always uses WGS84 latitude and longitude, so the converter reprojects the shapes from the coordinate system in the .prj. If it cannot read that coordinate system, it says so instead of guessing, and it warns when an older local datum (such as Arc 1960 or PSAD56) may leave shapes a few hundred metres off.

Are the attributes kept?

Yes. Every attribute is written to the KML, and a field called name or description becomes the placemark name or description shown in Google Earth.

Back to the tool ↑

Connect your data, understand your operations.

Bring in the spreadsheets, field forms and maps you already use, and see every site in one place.