GeoMapSuite
GIS & Mapping Data7 min readUpdated 2026-09-22

How to Create a KML File for Google Earth and Maps

A beginner-friendly guide to creating KML points, paths, and polygons, choosing coordinate order, validating the XML, and preparing a file for Google Earth or Google My Maps.

GSET
GeoMap Suite Editorial Team
Geospatial Content Team
Fact-checked & reviewed by Elena Rostova
Direct Answer (Quick Summary)

Create a KML file by defining a valid KML document, adding Placemarks with longitude-latitude coordinates, and saving the XML with a .kml extension. For a no-code workflow, use a browser-based KML editor or convert an existing GeoJSON, CSV, or GPX file, then validate and preview the result.

Live Interactive ToolFree & Client-Side

KML Editor

Create and edit supported KML features locally in your browser, then export a KML file.

Create a KML File
01

Choose the Right Way to Create KML

For one or two points, a browser editor is usually fastest. For a table of coordinates or an existing GIS layer, convert GeoJSON, CSV, or GPX to KML. Direct XML editing is useful when you need precise control over styles, folders, or metadata, but every tag must remain well-formed.

02

Create Points, Lines, and Polygons

A KML Placemark can contain a Point, LineString, or Polygon. Points mark locations, LineStrings represent routes or boundaries, and Polygons define filled areas. Give each feature a meaningful name and description so the layer remains understandable when opened in Google Earth.

03

Use the Correct Coordinate Order

Write coordinates as longitude,latitude,altitude. Longitude comes first, even though many spreadsheets display latitude first. Keep longitude between −180 and 180 and latitude between −90 and 90. For polygons, repeat the first coordinate at the end to close the ring.

Most common beginner mistake

Swapping latitude and longitude can create a valid-looking file that appears on the wrong continent.

04

Validate and Preview Before Sharing

Run the new file through a KML Validator to catch malformed XML, missing namespaces, and invalid coordinates. Then open it in the KML Viewer and Google Earth. Check the feature names, geometry, styling, and camera location before sending the file to someone else.

05

Share KML or Package It as KMZ

Keep KML when readability and editing matter. Convert it to KMZ when you want a smaller package or need to bundle supported icons and image overlays. Preserve the original editable KML as a source file for future revisions.

Interactive Calculators

Explore Related Spatial Tools

People Also Ask

People Also Ask About How to Create a KML File for Google Earth and Maps

Essential questions answered with verified geodesic formulas, datum standards, and practical mapping advice.

Use a KML editor or converter, add valid points, lines, or polygons, export with a .kml extension, and validate the file.

Topics:#Create KML file#KML editor#Google Earth KML#KML coordinates#KML polygon#GIS formats
Editorial Standards & Verification
Authored by GeoMap Suite Editorial Team

Geospatial Content Team

Specializing in geodetic algorithms, WGS84 coordinate mathematics, and large-scale spatial mobility studies across North America and Europe.

Peer-Reviewed by Elena Rostova

Senior GIS Analyst

Reviewed against the calculation method and source limitations documented for each tool. Provider-backed results and real-world conditions can vary.

More From the Geospatial Blog

View all guides