drawamap

KML viewer

Drop a KML file here

No Google Earth needed. It opens in this tab, on your machine.

.kml only. Got a .kmz? Unzip it first. GeoJSON, GPX and CSV also work.

Where your KML came from

KML stands for Keyhole Markup Language. Keyhole was a small company making satellite-imagery software, bought by Google in 2004; the product became Google Earth and the file format kept the old name. It went to the Open Geospatial Consortium as a standard in 2008, and version 2.2 is still what almost everything writes.

Underneath it’s XML, so it’s verbose, readable in a text editor and roughly ten times the size of the same data as GeoJSON. The central idea is the Placemark: a thing with a name, a description and a geometry. Google Earth, Google My Maps, Garmin BaseCamp, ArcGIS and most GIS packages will hand you one. If someone emailed you a map and it isn’t a PDF, there’s a fair chance it’s this.

The format carries far more than geometry: styles, icons, balloon HTML, overlays draped on the terrain, 3D models, time animation. That richness is why a KML can look spectacular in Google Earth and fairly plain anywhere else.

What opens, and what gets left behind

This is a geometry viewer with an editor attached, so it reads the shapes and their names and ignores the presentation. Worth knowing precisely which is which before you rely on it.

Comes through

  • Placemark names: the <name> on each placemark becomes the shape label, first 60 characters
  • Point: a marker
  • LineString: a line, editable point by point
  • Polygon: the outer boundary, as an editable polygon
  • MultiGeometry: each geometry inside comes through separately, sharing the placemark's name
  • Folders: flattened — the placemarks all open, the folder tree doesn't

Doesn’t

  • Styles and colours: your KML's own colours are ignored and shapes get the palette here instead, cycling through six
  • Descriptions: balloon text and its HTML, including photos and tables, isn't shown
  • ExtendedData: custom fields are dropped, apart from the radius a circle drawn here writes
  • Inner boundaries: a polygon with a hole in it opens as the outer ring, hole filled in
  • Altitude: the third number in each coordinate goes, along with altitudeMode, extrude and tessellate
  • NetworkLink: not followed, because the page makes no requests of its own
  • Overlays: GroundOverlay, ScreenOverlay and PhotoOverlay images don't draw
  • gx:Track: Google's timestamped track extension isn't read, so a recorded Earth track shows nothing
  • TimeSpan and TimeStamp: there's no time slider here, so dated placemarks all show at once

The gx:Track one bites hardest. If you recorded a track in Google Earth or a Garmin tool saved its trail as a gx:Track, the file will open and draw nothing, because the points live in Google’s extension rather than in a LineString. Export the same trip as GPX and it opens fine.

The .kmz problem

Google Earth saves .kmz by default, and Google My Maps often gives you one too, so a lot of people arrive here with the wrong file. A .kmz is a zip archive: a doc.kml plus any custom pin icons and overlay images it needs, bundled so you can email one attachment.

Rename it to .zip, open it, drop the doc.kml from inside. In Google Earth you can also right-click a folder, choose Save Place As and pick KML in the file type dropdown, which skips the zip entirely.

Converting KML to GeoJSON, GPX or CSV

Once the placemarks are on screen, the export buttons in the panel give you four ways out. GeoJSON if it’s going into a web map or a script. GPX if it’s going onto a GPS unit or a watch. CSV if someone wants a spreadsheet, which only works for markers: name, lat, lng, one row each. And KML back out again, if all you wanted was to delete half of it.

A conversion through here is lossy in the way described above. Going to GPX turns polygons into closed lines, since GPX has no concept of an area. GeoJSON gives the cleanest result, because both formats think in the same geometry types.

Circles get special handling in both directions. KML has no circle element, so Google Earth fakes one with a many-sided polygon. A circle exported from here goes out as a polygon too, with its centre and radius written into ExtendedData, which means reopening the file here gives you back a circle you can drag to resize.

Other formats: GeoJSON viewer and GPX viewer.

Honestly, how does this compare?

KML viewers are not a scarce resource. Google’s own My Maps will import one, there are half a dozen free web tools, and Google Earth is right there. For styling, overlays and 3D, Earth wins and it isn’t close.

What this does differently comes down to two things. Nothing is uploaded, which matters when the file is a client site, a survey or anything you’d have to ask a manager about before putting it on someone else’s server. Most of the free converters work by posting your file to a backend.

And the shapes stay editable. Move a misplaced placemark, delete the forty you don’t need, retype a name, add a polygon of your own, then export or share a link that carries the drawing inside the URL. If you only need to look at a file once, any viewer will do. If you need to fix it, doing both in one tab is the point.

FAQ
My file is a .kmz and nothing happens.
KMZ is a zip containing a KML plus whatever icons and overlays it references. Nothing here unzips it. Rename the file to .zip, open it, and you'll find doc.kml inside — drop that. It's two steps and it works every time, which is why we'd rather tell you than pretend to support the format.
Is my KML uploaded anywhere?
No. The browser reads it off your disk and draws it in the tab. Nothing is stored and there's no account to make. Map tiles do get fetched from a tile server, so that server can tell roughly where on Earth you're looking, but your file never leaves the machine.
My placemarks are in the wrong place.
Check the coordinate order inside the <coordinates> tags. KML writes longitude first, then latitude, then altitude, which is the reverse of how Google Earth's own interface shows you a position. Hand-written or script-generated KML gets this backwards constantly. Everything landing in the sea off west Africa means the numbers parsed as zero.
Why are my colours different?
Because KML styling is ignored on the way in. Your shapes come in as whatever the next palette colour is. You can recolour anything after it loads, and the KML this tool exports does carry colour: KML writes it as aabbggrr, alpha first and the red and blue swapped round from the hex you're used to.
Can it open a KML from a URL?
No. Download it first. That's a deliberate consequence of the page not talking to any server once it's loaded, rather than something we forgot.

More map tools