Converter Tools
KML Viewer and Validator
Paste or upload a KML file to preview points, lines, and polygons, validate against the OGC KML 2.2 spec, and export as GeoJSON or a positions CSV.
KML viewer, validator, and GeoJSON converter
Issues
Invalid input
Loading the KML parser in your browser...
Loading the KML parser in your browser...
How to use
- Pick Paste KML to type or paste a document, or Upload .kml file to drop a file from your machine.
- Read the verdict banner for a pass / fail signal, the placemark and position counts, and any KML 2.2 errors or warnings with the exact path inside the document.
- Inspect the SVG preview to confirm the geometry plots where you expect: points are amber, lines are green, polygons are blue with even-odd fill for inner-ring holes.
- Open the Document summary, Geometry types, and Folders panels to see the KML version, the bounding box, the type breakdown, and the per-folder placemark count.
- Use Copy as GeoJSON to grab a FeatureCollection ready for Mapbox, Leaflet, MapLibre, or PostGIS, Copy positions CSV to extract every longitude, latitude, and altitude to a spreadsheet, or Copy Formatted KML to grab a re-indented version of the document.
- Try Load valid sample for a Manhattan landmarks document, or Load broken sample to see how the validator reports out-of-range coordinates, an unclosed Polygon ring, and a Placemark that is missing geometry.
About this tool
KML Viewer and Validator parses any KML document (the XML format Google Earth, Google My Maps, ArcGIS, QGIS, Garmin BaseCamp, drone planners, and most consumer mapping apps export), checks it against the OGC KML 2.2 standard, previews every Placemark on an inline SVG map, and converts the whole document to GeoJSON, a flat positions CSV, or a re-formatted KML string. The parser uses the browser's native DOMParser to read the XML safely, then walks every <Document>, <Folder>, nested folder, and <Placemark> to extract <Point>, <LineString>, <Polygon>, and <MultiGeometry> elements. Coordinate text is split on whitespace and parsed as a comma-separated tuple of longitude, latitude, and optional altitude (the KML order, which is the opposite of latitude / longitude that many people expect), and every value is validated against the -180 to 180 longitude and -90 to 90 latitude range with finite-number checks. LinearRings inside <Polygon> are verified for the minimum four positions and the closing-position requirement, and inner rings (holes) are projected into the GeoJSON output. Every issue is reported with an XML breadcrumb-style path like 'kml > Document > Folder[1] > Placemark[3] > Point > coordinates' so a GIS analyst can jump straight to the bad value. The SVG preview projects every geometry to the same bounding box using an equirectangular projection around the centre latitude so the picture stays usable from tropics to polar caps, with points drawn amber, lines green, and polygons blue with an even-odd fill that respects holes. Document-level summaries report the KML schema version (parsed from the xmlns attribute), the document name, the placemark count, the folder count, the bounding box in longitude and latitude, the geometry-type breakdown (Point, LineString, Polygon, MultiGeometry), and a per-folder placemark count so deeply nested My Maps exports are easy to inspect. The GeoJSON export builds a FeatureCollection with one Feature per Placemark, carries the name, description, styleUrl, and folder path into Feature.properties, and maps KML MultiGeometry to the GeoJSON GeometryCollection. The CSV export emits one row per Position with the placemark index, placemark name, folder path, geometry kind, ring index, position index, longitude, latitude, and altitude, ready to load into Excel, Google Sheets, Pandas, or PostGIS. .kmz files are detected by their ZIP signature; this tool stays dependency-free, so the user is asked to unzip and upload the inner doc.kml. Everything runs locally in your browser; the file you paste or drop in is never uploaded, which matters when you are reviewing client routes, restricted survey areas, or any geographic data that should not leave your device.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
GeoJSON Viewer and Validator
Preview, validate, and export any GeoJSON document against RFC 7946 in your browser.
Open tool
ConverterGPX File Viewer
Stats, map preview, elevation profile, and CSV or GeoJSON exports for any GPX file.
Open tool
ConverterGoogle Polyline Encoder and Decoder
Two-way Google polyline encoder, decoder, and path preview in your browser.
Open tool
ConverterGPS Coordinate Converter
Convert latitude and longitude between DD, DMS, and DDM.
Open tool
ConverterGeohash Converter
Two-way geohash converter with precision, bounding box, and neighbor cells.
Open tool
ConverterUTM Coordinate Converter
Convert WGS84 lat/lon to UTM (zone, easting, northing) and back, with scale factor and convergence.
Open tool
DeveloperXML Formatter
Format, minify, and validate XML with line and column error reporting.
Open tool
ConverterXML to JSON Converter
Convert XML to JSON with attribute, text, force-array, and value-parsing options.
Open tool