SM Datum

Shapefile to KML Converter

Convert a shapefile to KML or KMZ for Google Earth and Google My Maps. Drop a zip or the .shp, .dbf and .prj files. Attributes are kept, projected coordinates such as UTM are converted to longitude and latitude, and polygon holes are preserved. The files are read in your browser and never uploaded.

Drop a zipped shapefile here, or click to choose files
Pick one .zip, or select the .shp, .dbf and .prj files together. Nothing is uploaded: the files are read in your browser.

No file handy? Download a sample shapefile (three parks, one with a hole, in UTM zone 43N) to see the reprojection.

    How to convert a shapefile to KML

    1. Load the shapefile. Drop a .zip that holds the shapefile, or choose the .shp, .dbf and .prj files together. A shapefile is several files, and the .prj file is what tells this page which map projection the coordinates use.
    2. Check the preview. The page shows how many points, lines and polygons it found, which coordinate system it read from the .prj, and the first rows of the attribute table.
    3. Choose the options. Pick the field to use as each placemark's name, keep or drop the attributes, and set the colours, line width and polygon fill.
    4. Download. Click Download KML for a plain file, or Download KMZ for a compressed one. Open it in Google Earth or import it into Google My Maps.

    Which files do I need?

    A shapefile is a set of files that share one name. Select them together or put them in a .zip.

    FileNeeded?What it holds
    .shpYesThe shapes: points, lines or polygons.
    .dbfRecommendedThe attribute table. Without it the KML has shapes but no names or data.
    .prjYes, unless the data is already longitude/latitudeThe coordinate system. It lets this page convert projected coordinates (such as UTM metres) to the longitude and latitude that KML needs. Without it, projected coordinates cannot be placed on the map.
    .cpgOptionalThe text encoding of the .dbf, so accented and non-Latin characters read correctly.
    .shxNoAn index file. It is not needed here.

    What the KML contains

    • Geometry. Points, multipoints, lines and polygons, including multipart shapes and polygons with holes. Polygon holes become inner boundaries, so islands and lakes stay cut out in Google Earth.
    • Names and attributes. Each record becomes one placemark. The field you choose becomes its name. All the attributes are kept twice: as a table in the placemark's balloon and as data fields (ExtendedData) that GIS software can read back.
    • Style. One set of colours for the whole file: point colour, line colour and width, polygon fill colour and opacity. It is not styled per field or per category.
    • Elevation. If the shapefile has Z values (PointZ, PolyLineZ, PolygonZ), a tick box lets you write them as altitudes. They are off by default so shapes stay on the ground.
    • Coordinates. Always WGS 84 longitude and latitude in decimal degrees, which is what KML requires.

    Which projections are supported?

    The page reads the projection from the .prj file and converts every coordinate to longitude and latitude. It supports:

    • Geographic coordinates (longitude/latitude), such as WGS 84, NAD83 or ETRS89.
    • Transverse Mercator, including every UTM zone and national grids built on it (for example the British National Grid or New Zealand Transverse Mercator).
    • Web Mercator (EPSG:3857) and standard Mercator.
    • Lambert Conformal Conic and Albers Equal Area.

    The calculations were checked against the PROJ library on sample points for UTM zones, Web Mercator, Lambert 93, an Albers equal-area grid and the British National Grid, and agree to well under a millimetre. If the .prj uses a projection that is not on this list, the page says so instead of guessing; reproject the shapefile to WGS 84 in QGIS or with the CRS Converter and try again.

    Datums. Datum shifts are not applied. For WGS 84, NAD83, ETRS89 and similar datums that is correct to within about a metre or two. If your shapefile uses an older local datum, the page shows a warning, because the result can be up to a few hundred metres off the true position.

    Common problems and how to fix them

    The shapes appear in the wrong place, or in the ocean

    The coordinates and the coordinate system do not match. Most often the .prj file is missing or belongs to a different layer. Include the right .prj file. If the numbers are in metres and there is no .prj, this page stops and tells you, rather than putting the data in the wrong place.

    The page says the projection is not supported

    Reproject the shapefile to WGS 84 (EPSG:4326) first, in QGIS or with the CRS Converter, then convert the result.

    Names show as question marks or strange characters

    Include the .cpg file that came with the shapefile. Without it the page uses UTF-8 when the data is valid UTF-8, and Windows-1252 otherwise. Older Windows shapefiles in other languages may need their .cpg to decode correctly.

    Field names are cut short

    The shapefile format limits field names to 10 characters, so the names are cut short inside the file itself. They are written to the KML exactly as stored.

    Nothing was found in my zip

    The .zip must contain a .shp file. Folders inside the zip are fine. If it holds several shapefiles you are asked which one to convert.

    What this converter does and does not do

    • One shapefile at a time. A zip with several shapefiles lets you choose one; run the converter again for the next.
    • Not supported: MultiPatch (3D surface) shapes, the newer WKT2 style of .prj file, and datum transformations.
    • Not exported: per-category styling, labels from a field, time stamps and images. For those, restyle the data in KML Studio.
    • Runs in your browser. Nothing is uploaded and there is no signup, so the practical size limit is your computer's memory. Very large shapefiles may be slow on a phone.
    • Deleted records. Records marked as deleted in the .dbf are left out.

    Shapefile or KML: what is the difference?

    A shapefile is the standard GIS exchange format: several files, one geometry type each, any projection, attributes in a table. KML is an XML format that Google Earth and Google My Maps open directly, always in longitude/latitude, with styling and a balloon for each place. Convert to KML to look at or share data in Google Earth. To go the other way, use KML to Shapefile or GeoJSON to Shapefile. For web maps and code, use Shapefile to GeoJSON. The GIS Format Converter also writes GeoPackage and more.

    Frequently asked questions

    How do I convert a shapefile to KML?

    Drop the zipped shapefile onto the converter, or select the .shp, .dbf and .prj files together. Check the preview, then click Download KML or Download KMZ. The conversion runs in your browser.

    Is it free, and do I need an account?

    It is free and needs no account or signup. The files are read in your browser and never uploaded to a server.

    Do I have to zip the shapefile?

    No. You can choose the .shp, .dbf, .prj and .cpg files together, or give it one .zip that contains them.

    Why does it need the .prj file?

    KML always uses longitude and latitude, but many shapefiles store metres in a map projection such as UTM. The .prj file says which projection, so the page can convert the coordinates correctly. If your data is already in longitude/latitude, the .prj is optional.

    Which coordinate systems can it convert?

    Geographic coordinates, Transverse Mercator (every UTM zone and grids based on it), Web Mercator and Mercator, Lambert Conformal Conic and Albers Equal Area. Other projections are refused with a clear message rather than converted wrongly.

    Does it change the datum?

    No. Datum shifts are not applied. For WGS 84, NAD83, ETRS89 and similar datums that is accurate to about a metre or two. For an older local datum the page shows a warning, because positions can be off by up to a few hundred metres.

    Are the attributes kept?

    Yes. The field you choose becomes the placemark name. All fields are written as a balloon table and as ExtendedData data fields. You can switch the attributes off to get a smaller file.

    Does it keep holes in polygons?

    Yes. Holes become inner boundaries in the KML, so lakes and islands stay cut out. Multipart polygons become one placemark with several shapes.

    Can it write KMZ as well as KML?

    Yes. KMZ is a zipped KML. The page compresses it with the browser's built-in compression and falls back to an uncompressed but valid KMZ if the browser cannot compress.

    Can I choose the colours?

    Yes: point colour, line or outline colour, line width, polygon fill colour and fill opacity, or no fill. The same style is used for the whole file.

    What happens to 3D (Z) shapefiles?

    PointZ, PolyLineZ and PolygonZ shapes are read. A tick box lets you write the Z values as altitudes. It is off by default so the shapes sit on the ground in Google Earth.

    What if my zip contains several shapefiles?

    The page lists them and converts the one you choose. Convert the others one after another.

    Is there a file size limit?

    There is no fixed limit, but the work happens in your browser's memory. Shapefiles with hundreds of thousands of features can be slow, especially on a phone.

    How do I convert KML or GeoJSON back to a shapefile?

    Use KML to Shapefile or GeoJSON to Shapefile, which write a zipped shapefile with the .shp, .shx, .dbf, .prj and .cpg files. This page only converts to KML and KMZ.

    Related tools and guides

    Need survey data cleaned, projected or mapped at scale? Sagarmekhla GIS Consultancy offers GIS and remote sensing services.

    Request a consultation

    Last updated 2026-10-15. Published by Sagarmekhla GIS Consultancy.