Why convert SHP to KML?
.kml is the format Google Earth and Google Maps import natively, making it the standard way to visualize GIS data without a dedicated GIS application. KML is also a single self-contained file, which is easier to share than the multi-file Shapefile bundle.
How to convert SHP to KML
QGIS OPEN-SOURCE
Add the .shp via Layer > Add Layer > Add Vector Layer, right-click the layer, choose Export > Save Features As, set format to Keyhole Markup Language (KML), and set CRS to EPSG:4326.
ogr2ogr OPEN-SOURCE
Run ogr2ogr -f KML out.kml in.shp in a terminal, adding -t_srs EPSG:4326 if the Shapefile is not already in WGS 84. ogr2ogr ships with QGIS on Windows.
About these formats
A .shp file is almost always an Esri Shapefile - geospatial vector data (points, lines, polygons) used by GIS software. It is one piece of a set: it needs its sibling files (.shx, .dbf, and…
Open .SHP details →A KML file stores map data - pins, routes, polygons, image overlays - in plain XML format. The easiest way to open one is Google Earth (free desktop app or earth.google.com in a browser) or…
Open .KML details →Quality & what to watch
- The Shapefile must have all companion files present -
.shxand.dbfare mandatory, and.prjis critical for correct coordinate assignment in the output KML. - Skipping reprojection to EPSG:4326 when the Shapefile uses a projected CRS produces a KML that places features in the wrong location in Google Earth.
- Shapefile attributes transfer to KML as ExtendedData elements, visible in Google Earth's feature info popup.
Frequently asked questions
Does the converted KML open in Google Earth?
.kml or drag it into the Google Earth window.What is the difference between KML and KMZ?
.kml and rename it .kmz for a smaller file size.Do I need all Shapefile component files?
.shp, .shx, .dbf, and .prj must all be in the same folder; missing any will cause the conversion to fail or produce incorrect output.