simplemaplab

KML Viewer — View & Convert KML Files Online

Drag any .kml file onto the map to see every Placemark, LineString, and Polygon on an OpenStreetMap base map. Click features for properties. Convert to GeoJSON in one click. No Google Earth required, no signup, no upload — all parsing happens in your browser.

The KML Viewer parses your file with the browser's built-in DOMParser, converts every Placemark to a GeoJSON Feature, and renders the result with MapLibre GL JS. It handles the common 90% of KML — Points, Lines, Polygons (with inner rings), MultiGeometry, and ExtendedData — and produces a clean GeoJSON export so the file is usable in any web map.

Drop a .kml file anywhere in this box, or use the controls above. Max file size 8 MB. Files are parsed locally — nothing is uploaded.
Or try a sample:
KML preview
No file loaded
🗺️
Load a KML file to see every feature listed here.
  • Drag a file into the dashed box
  • Or paste raw text and click Render this text
  • Or click a sample chip above

How to use the KML Viewer

  1. Drag your .kml file onto the map. Drop the file anywhere in the dashed input zone, or click "Upload file" to pick it from a folder. KML, KML/XML, and plain .txt versions are all accepted up to 8 MB. Parsing happens locally in your browser — the file never leaves your device.
  2. See every Placemark on the map. Points become green dots, LineStrings become teal paths, and Polygons become a blue fill with a darker outline. The map auto-fits to the bounding box of all features. The sidebar lists every Placemark with its geometry type, sorted top to bottom in document order.
  3. Click a feature for properties. Click any feature in the sidebar (or click directly on the map) to highlight it red and pop the properties table at the bottom of the tool. Name, description, ExtendedData fields, and styleUrl all show up. The map flies to the feature's centroid.
  4. Export, convert, or grab the bbox. Use the bottom-right buttons to download the loaded data as a fresh KML, convert it to GeoJSON, convert it to GPX (for Garmin or Strava), copy the raw JSON to your clipboard, or copy the bounding box (west, south, east, north) for use in another GIS tool.

What people use the KML Viewer for

Open a Google My Maps export without Google Earth

Google My Maps exports every layer as a .kmz, which is just a zipped KML. Unzip it (most operating systems can do this with a double-click), drop the inner doc.kml into this viewer, and you can browse every pin and shape without needing Google Earth Pro or Google's account login screen.

Inspect KML from real-estate, drone, or survey work

Real-estate parcel exports, drone flight plans (Litchi, DJI Fly), and surveyor field collectors (ArcGIS Field Maps, QField) all output KML. This viewer turns those files into something you can hand a client — a clean live map with the actual data, no Earth-engine onboarding required.

Convert KML to GeoJSON for a web map

You have a KML from a colleague, but your Leaflet/MapLibre/Mapbox app needs GeoJSON. Drop the KML here, click "Download GeoJSON," and you have a clean RFC-7946 FeatureCollection — Placemark names and ExtendedData preserved as feature properties.

Audit a hiking, biking, or running route

AllTrails, Strava heatmap exports, and bike-park trail systems publish routes as KML. Drop the file here to confirm the line connects correctly, has no broken segments, and stays within the right bounding box before sending it to a printer or a guidebook layout.

Visualise an ArcGIS export on a web basemap

When ArcGIS Pro exports KML, the labels and styling sometimes break in Google Earth. This viewer renders the geometry on an OpenStreetMap basemap so you can confirm the polygons are valid (right number of rings, no overshoots) before you ship the file downstream.

Cite-check a journalism map

A reporting team published a KML map of incidents or events. To verify, drop the KML into this viewer — every pin is labelled and clickable, every polygon is outlined, and you can copy the bbox if you need to triangulate against another source.

KML format reference

A minimal KML file looks like this. The viewer accepts anything that conforms to OGC KML 2.2 (the only standardised version) — including files exported by Google Earth, Google My Maps, ArcGIS Pro, QGIS, Garmin BaseCamp, GPS Visualizer, and most drone-flight planners.

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <name>My places</name>
    <Placemark>
      <name>Golden Gate Bridge</name>
      <description>San Francisco landmark.</description>
      <Point><coordinates>-122.4783,37.8199,67</coordinates></Point>
    </Placemark>
    <Placemark>
      <name>Pacific Crest Trail (segment)</name>
      <LineString>
        <coordinates>
          -120.65,38.93,0 -120.60,38.95,0 -120.55,38.96,0
        </coordinates>
      </LineString>
    </Placemark>
  </Document>
</kml>

Note the <coordinates> order is longitude, latitude, altitude— the reverse of how humans usually quote coordinates. KML inherits this from Google's original format. The viewer handles this automatically; you do not need to flip anything before loading.

Supported elements

Not supported

KML vs GeoJSON — which should you use?

KML is the older, XML-based, Google-Earth-native format. GeoJSON is the newer, JSON-based, web-mapping standard (RFC 7946). For a public-facing web map use GeoJSON. For Google Earth, GPS devices, drone-flight planners, or older GIS workflows use KML. The two are interchangeable — load either format into the viewer above and export to the other in one click.

Related geographic-data tools

For GeoJSON files: GeoJSON Viewer. For GPX tracks from Strava, Garmin, AllTrails, or Komoot: GPX Viewer. For plotting a CSV of coordinates: CSV to Map. For dropping a handful of pins by hand: Pin Drop Map. For drawing on the map with a mouse: Map Drawer. For embedding a Google Maps view in a website: Embed Google Maps.

Frequently asked questions

KML (Keyhole Markup Language) is an XML-based file format for geographic data. It was developed by Keyhole Inc., acquired by Google in 2004, and standardised by the Open Geospatial Consortium as KML 2.2 (OGC 14-156) in 2008. It is the native format of Google Earth and a common interchange format for GPS devices, drones, ArcGIS Pro, QGIS, and Google My Maps.
Drop the .kml file onto this page. The KML Viewer parses the XML in your browser using DOMParser, converts every Placemark to a GeoJSON Feature, and renders the result on a MapLibre/OpenStreetMap base map. No software install, no Google account, no upload to a server. Works on Mac, Windows, Linux, iOS, and Android browsers.
Not directly — KMZ is a zipped KML. Unzip it first (right-click → Extract on Windows; double-click on macOS), then drop the inner doc.kml (or whichever .kml file the archive contains) onto the viewer. We may add native KMZ support in a future update; for now the unzip-and-drop workflow is one click.
The browser ingest is capped at 8 MB. For most real-world KML files (a few hundred Placemarks) that is far more than enough. Files with very large boundary polygons — full US-state outlines, for example — may approach the limit. For files larger than 8 MB, simplify the geometry with mapshaper.org first or use the GeoJSON viewer with a pre-converted file.
Point, LineString, Polygon (with multiple rings), and MultiGeometry are fully supported. Folders are flattened — every Placemark renders regardless of nesting. <name>, <description>, <ExtendedData> / <Data> / <SimpleData>, and <styleUrl> are preserved as feature properties. NetworkLinks, Tours, screen overlays, and inline <Style> blocks are skipped — we apply our own clean rendering palette.
The basemap is OpenFreeMap Liberty — a free, no-API-key MapLibre vector tile layer derived from OpenStreetMap. The tiles render in your browser; nothing about your KML file is sent to any tile server. Map data is © OpenStreetMap contributors, ODbL.
Yes. After loading a KML, click "⬇ GeoJSON" in the export row. The downloaded file is a valid RFC 7946 FeatureCollection — Placemark names, descriptions, and ExtendedData fields preserved as feature properties. For the reverse direction (GeoJSON → KML) use the same tool: load any GeoJSON file and click "⬇ KML".
KML is XML; GeoJSON is JSON. KML was designed for Google Earth and supports altitude, time spans, camera positions, and rich descriptive HTML. GeoJSON, defined by RFC 7946, is the de facto format for the web — every modern mapping library (Leaflet, MapLibre, Mapbox, ArcGIS API for JS) consumes GeoJSON natively. If you need a file for a web map, prefer GeoJSON. If you need a file for Google Earth or older GIS workflows, KML is still common.
No upload. The file is read locally with the FileReader API, parsed with the browser's built-in DOMParser, and rendered to MapLibre — all in your browser. The only outbound network calls are for the base-map tiles, which carry only the visible map area, not your data. There is no analytics on file contents and nothing is stored.
The most common cause is a non-standard namespace or a custom extension (Google Earth tolerates many non-conformant constructs). If the error message mentions "Invalid XML" the file probably has unescaped <, > or & characters. If it says "No Placemark elements" the file may use only NetworkLinks (which we don't fetch). Open the .kml in a text editor to inspect — Notepad++, BBEdit, or VS Code all handle large XML files comfortably.
Yes — click "Paste text" to expand the input area, then paste the URL into the "Fetch URL" box and click the button. The remote server must send CORS headers (Access-Control-Allow-Origin) for your browser to allow the fetch. GitHub raw URLs, S3 public buckets, GitHub Gists, and most CDNs all work. Many enterprise GIS portals do not — for those, download the file first and use the upload button.
Google Earth offers altitude, time animations, 3D buildings, terrain, NetworkLink streaming, and Pro-only export features. This viewer is a quick-look tool — fast, no install, no account, runs on a Chromebook or a phone, converts to GeoJSON in one click. For deep KML analysis stick with Google Earth Pro; for "I just need to see what is in this file" this viewer is faster.
Data sources & methodology

Parser hand-written against OGC KML 2.2 (OGC 14-156) using the browserDOMParser. Rendering by MapLibre GL JS 5.x with a single GeoJSON source feeding four layers (fill, polygon outline, line, circle). Base map: OpenFreeMap Liberty — vector tiles derived from OpenStreetMap (© OSM contributors, ODbL). No data leaves your browser — files are read via FileReader, parsed locally, and rendered to MapLibre without touching a server. The 8 MB cap is enforced before parsing to keep the page responsive.

More SimpleMapLab tools

GeoJSON Viewer

Drag a .geojson onto the map — view, inspect, convert to KML or GPX.

GPX Viewer

Drag a .gpx from Strava, Garmin, or AllTrails — tracks, waypoints, stats.

CSV to Map

Plot a CSV of lat/lng on an interactive map — color by category.

Pin Drop Map

Drop up to 100 pins with notes, colors, and CSV/GeoJSON/KML export.