KML to Shapefile Converter: Google Earth Files into GIS
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.
Nothing leaves your device.
Waiting for a file.
Features in this file
| Name | Type | Folder | Vertices | Length | Area |
|---|

How to use this tool
Drag a KML file onto the panel above, or press Choose a file. The file is read where it sits, so a large export opens as fast as your disk can hand it over and the page keeps working with no signal. Check the map and the feature table, then press Convert to shapefile and download. What comes back is a single zip holding four files, and you should keep them together.
The thing people get wrong is expecting one file out. A shapefile is not a file, it is a set, and a .shp on its own is useless to whoever you send it to. If your recipient says the file will not open, the usual reason is that only the .shp was attached to the email.
If your KML holds a mixture of points, tracks and areas, the conversion will stop and say so. That is not the tool being awkward. A shapefile can hold exactly one shape type, so a mixed file has to become two or three separate shapefiles. Split it in Google Earth by folder, export each folder, and convert them one at a time.
What a shapefile actually is
The format dates from the early 1990s and it shows. Geometry lives in the .shp. Attributes live in a .dbf, which is a dBase III table, a format that predates the shapefile by about a decade. The .shx is an index recording where each shape starts inside the .shp, and although it can be rebuilt, most software simply refuses to open the set without it. The .prj holds a text description of the coordinate system.
That last file is the one that matters most and the one most often missing. Nothing inside a .shp says whether the numbers in it are degrees of latitude or metres on a grid. A coordinate pair reading 673513, 4096742 is perfectly valid as either. Without a .prj, software has to guess, and the usual guess is degrees, which drops your site somewhere in the Gulf of Guinea off west Africa. That spot, zero north and zero east, is where every unprojected dataset in the world ends up. It is common enough that cartographers named the imaginary island there Null Island.
This converter always writes a .prj, and it always writes WGS84, because that is what KML is defined to hold.
What survives the conversion, and what quietly does not
Geometry and coordinates transfer exactly. So do names, descriptions and any ExtendedData values, which become columns in the attribute table. Beyond that, things start being lost, and none of it produces a warning.
Folders disappear as structure. A KML can nest folders inside folders, and people use that nesting to mean something, usually a survey phase or a contractor. A shapefile has no concept of a folder, so that hierarchy has to be flattened into an ordinary text column. This tool writes the full folder path into a column so the information is at least preserved, but it is no longer a tree.
Styling disappears entirely. Icon images, line colours, fill transparency and label styles have no home in a shapefile. If the colours in your KML carry meaning, and they usually do, that meaning needs to become an attribute column before you convert, or it is gone.
Attribute names get shortened. A .dbf column name cannot exceed ten characters, which is not a limit this tool invents, it is the dBase format from 1983. A field called measured_depth_m becomes measured_d. Two fields that both shorten to the same ten characters would collide, so the second is renamed with a digit on the end. Check the columns after converting if the names matter to you.
Height is dropped. This converter writes two dimensional shapes. If your KML carries elevation as the third coordinate and you need it, keep it as an attribute rather than relying on the geometry.
A worked check you can repeat on paper
The most useful thing to understand about this conversion is the ring reversal, because it is invisible and it changes what your data means. Take a simple square with corners at 0 and 1 degrees east, 45 and 46 degrees north, listed the way KML and GeoJSON list it: 0,45 then 1,45 then 1,46 then 0,46 and back to 0,45.
Work out the shoelace sum. For each edge, multiply the first point x by the second point y, subtract the second point x times the first point y, and add up the results:
- 0,45 to 1,45 gives 0 times 45 minus 1 times 45, which is minus 45.
- 1,45 to 1,46 gives 1 times 46 minus 1 times 45, which is plus 1.
- 1,46 to 0,46 gives 1 times 46 minus 0 times 46, which is plus 46.
- 0,46 to 0,45 gives 0 times 45 minus 0 times 46, which is zero.
- The sum is minus 45 plus 1 plus 46, which is plus 2.
A positive sum means the ring runs counter clockwise. That is exactly what GeoJSON requires for an outer ring, and it is how the square was written. The shapefile specification requires the opposite: outer rings clockwise, holes counter clockwise. So before writing, this tool reverses the vertex order to 0,45 then 0,46 then 1,46 then 1,45, which gives a shoelace sum of minus 2. Same square, same area, opposite direction.
Why it matters: many readers use that sign to decide whether a ring is solid ground or a hole punched through it. Get the winding wrong and a lake becomes an island, or the hole in a permit area becomes part of the permit area. There is no error message, the shape simply means something different. If you have ever opened a converted polygon and found the middle filled in, this is why.
How this converter was checked
The shapefile writer was built twice. One implementation runs here in your browser, a second and independent one runs under Node, and they are compared automatically. On top of that, files this tool writes are read back by a third party shapefile library that shares no code with either, so a mistake would have to be made identically in three places to survive.
The projection maths is tied to an independently verified distance solver rather than checked against itself. Two points on a central meridian, two kilometres apart: the grid distance divided by the true distance on the ellipsoid must equal the UTM scale factor exactly, 0.9996. It comes out at 0.999600000167. Round trips through UTM and back close to within 0.62 mm across six sites on five continents.
The winding behaviour described above was found by that cross checking, not assumed. Our reader and the third party reader returned the same rings in opposite order. Ours reproduces the original vertex for vertex and follows the GeoJSON specification, and there is now a permanent test asserting it stays that way.
Mistakes that catch people out
Sending only the .shp. It happens constantly. Zip the whole set, including the .prj, and send the zip. If you receive a lone .shp, you can often still open it, but any coordinate system information is gone and you are guessing.
Assuming a shapefile can hold your whole map. It cannot. One shape type per file. A site plan with boreholes, access tracks and a permit boundary is three shapefiles, not one, and any tool that claims otherwise is quietly dropping most of your data.
Trusting attribute names to survive. Ten characters, and that limit is enforced by a format older than most of the people using it. Rename your fields to something short and meaningful before converting rather than letting software truncate them for you.
Forgetting that KML writes longitude first. The order in a KML coordinates tag is longitude, then latitude, then height, which is the reverse of how almost everyone says it. If your converted data has moved somewhere absurd, check this before anything else.
Expecting the file to remember what Google Earth showed you. Colours, icons, folder structure, balloon layout and the order things were drawn in are all Google Earth concepts. The shapefile keeps the geometry and the table. Everything else is presentation, and presentation does not travel.
Related Calculators and Reference
The usual next step is either to check what is inside the file before converting it, or to get the coordinates into a grid you can set out from.
- KML and KMZ Viewer for reading what is actually in the file first, including folder paths and attributes, before you commit to a conversion.
- Coordinate Converter, latitude and longitude to UTM for turning the converted positions into grid coordinates a total station can use.
- GPS Waypoint Logger for collecting new points in the field to compare against the file you just converted.
- CSV Cleaner for XYZ data for tidying the attribute table this tool exports before it goes anywhere else.
- Contour Map Generator for turning converted points with heights into a contoured surface.
- The Esri Shapefile Technical Description is the original specification, and it is the authority on record layouts and ring winding.
