Home › Developer Tools › KML Viewer

KML Viewer

Open a .kml or .kmz file exported from Google Earth, Google My Maps, a GPS app or GIS software and see every placemark, path and polygon on an OpenStreetMap map with its original colors. Browse the folders, read descriptions and data fields, measure lengths and areas, and export to GeoJSON or CSV, all without uploading the file.

Last updated:

Advertisement
Advertisement

How to use the KML Viewer

  1. Open your file with Open KML / KMZ, drop it on the map, or paste KML text. A Yosemite sample is shown first.
  2. Explore the map: drag to pan, scroll, pinch or use + and − to zoom, and press ⤢ to fit everything.
  3. Use the Places list to browse folders, hide layers with the checkboxes and filter by name.
  4. Click a place on the map or in the list to read its description, data fields, length or area.
  5. Export the placemarks to GeoJSON or CSV for use in other mapping tools or spreadsheets.

KML elements this viewer understands

ElementWhat it isHow it is shown
<Placemark>A feature with a name, description and geometryOne row in the Places list and a shape on the map
<Point>Single location lon,lat[,alt]Pin in the icon color, with a label
<LineString>, <gx:Track>Path or recorded trackLine in the LineStyle color and width, with length
<Polygon>Outer ring plus optional holesFilled area using PolyStyle, with area and perimeter
<MultiGeometry>Several geometries in one placemarkAll parts drawn and measured together
<Folder>, <Document>GroupingFolder tree with show/hide checkbox
<Style>, <StyleMap>Colors, widths, iconsApplied to the features that reference them
<ExtendedData>Custom attributes (Data or SchemaData)Key/value table in Details and extra CSV columns
<GroundOverlay>Image draped over a lat/lon boxImage from the KMZ, or a dashed outline
<NetworkLink>Link to another KML on the webCounted but not loaded

KML colors are written backwards

KML stores colors as aabbggrr hexadecimal: alpha (opacity), blue, green, red. That is the reverse of the familiar web order. For example ff0000ff is opaque red, 7f00ff00 is half-transparent green, and the web color #2f6b4f becomes ff4f6b2f in KML. When exporting to GeoJSON, this viewer converts each color back to normal #rrggbb plus a separate opacity value.

Coordinates in KML are always longitude first, then latitude, separated by commas, with tuples separated by spaces: -119.5737,37.7308,2199. A file whose shapes appear in the ocean off Africa usually has latitude and longitude swapped or set to zero.

Frequently asked questions

What is a KML file?

KML (Keyhole Markup Language) is an XML format for geographic data created for Google Earth and standardized by the Open Geospatial Consortium in 2008. It stores placemarks with points, lines and polygons, plus names, descriptions, styles and folders. Coordinates are longitude, latitude and optional altitude in WGS 84.

What is the difference between KML and KMZ?

A KMZ file is a ZIP archive that contains a KML file (usually doc.kml) together with the images it uses, such as custom icons or ground overlay pictures. This viewer unzips KMZ files in your browser and uses the packed images for icons, overlays and description pictures.

How do I open a KML file from Google My Maps?

In My Maps open the map menu (three dots), choose Export to KML/KMZ, pick the layer or the entire map and download. You can open the KMZ directly; tick 'Export as KML' if you prefer a plain text file. Placemark colors and icons chosen in My Maps are kept.

Why are some things in my file not shown?

Network links point to other KML files on the web and are not fetched, to keep your data private and because many servers block it. 3D models are shown as points, photo overlays and screen overlays are skipped, and overlay images that are referenced by URL instead of being packed in a KMZ are drawn as an outline.

Is the description HTML safe to display?

Descriptions are cleaned before display: scripts, frames, forms, styles and event handlers are removed, links open in a new tab, and only images packed inside the KMZ are shown. Remote images are not loaded, so opening a file never contacts the servers it mentions.

How accurate are the length and area values?

Lengths use the haversine great-circle formula and areas a spherical polygon formula on a sphere with the mean Earth radius (6,371 km). For typical maps this is within about 0.5 percent of precise ellipsoidal values. Altitude is ignored for distances.

Can I convert KML to GeoJSON or CSV here?

Yes. Download GeoJSON writes every placemark with its name, description text, folder and ExtendedData fields as properties and its colors as simplestyle properties. Download CSV writes one row per placemark with latitude and longitude (the point or the center of a line or polygon), length, area, data fields and a WKT geometry column.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

GeoJSON ViewerView GeoJSON on a map, inspect and edit properties, validate against RFC 7946 and export.GPX ViewerOpen GPX tracks on a map with distance, elevation profile, moving time, speed and splits.Shapefile ViewerView zipped shapefiles on a map with the attribute table, then export to GeoJSON or CSV.What Are My GPS CoordinatesSee your latitude and longitude in decimal and DMS, with accuracy and maps.JSON to Excel ConverterTurn JSON into a styled .xlsx spreadsheet; nested arrays become their own linked sheets.JSON to CSVConvert JSON data to CSV for spreadsheets.CSV to JSONConvert CSV data to JSON with live preview.Excel to CSVConvert XLSX spreadsheets to CSV.CSV ViewerOpen a CSV or TSV file as a sortable, filterable table.Excel Viewer (XLSX / XLS)Open XLSX, XLS and ODS spreadsheets in your browser without Excel.Line Ending ConverterConvert text and files between CRLF, LF and CR line endings.Markdown to HTMLConvert Markdown to clean HTML with a live editor.XML to JSONConvert XML to JSON with validation.Text Encoding ConverterDetect and convert text file encodings like UTF-8, UTF-16 and Latin-1.JSON ViewerExplore JSON as a collapsible tree, search keys and values and copy any node's path.TTF to WOFF2 ConverterConvert TTF and OTF fonts to WOFF2 or WOFF and get a ready @font-face CSS snippet.Chmod CalculatorConvert Linux file permissions between checkboxes, octal (755) and symbolic (rwxr-xr-x) notation.JSON to TypeScriptGenerate TypeScript interfaces or types from JSON, with nested types and optional fields.Morse Code TranslatorTranslate text to Morse code and back, then play it as sound or a blinking light, or save a WAV.HTML Table GeneratorBuild HTML tables in an editable grid with styles, header rows, CSV import and live preview.Hex to Text ConverterConvert hex to text and text to hex with UTF-8 support and space, 0x, \x or comma formats.JSON to XML ConverterConvert JSON to well-formed XML with attributes, arrays and pretty print.JSON to YAML ConverterConvert JSON to clean YAML as you type, with indent, quoting and sort options.YAML to JSON ConverterConvert YAML to pretty or minified JSON, with errors pinned to the exact line.HTML to Markdown ConverterTurn HTML or pasted rich text into clean Markdown with tables and live preview.Markdown Table GeneratorBuild Markdown tables in a grid or paste from Excel/CSV, with alignment and preview.JSON ValidatorCheck JSON with the exact line and column of each error, fix tips and one-click auto-fix.Image to Base64Convert images to Base64 data URIs, CSS backgrounds and HTML img tags in your browser.Base64 to ImagePaste a Base64 string or data URI to preview, identify and download the image.JSON CompareCompare two JSON documents and see every added, removed and changed path.Hex to DecimalConvert hex to decimal instantly with steps and signed mode.Decimal to HexConvert decimal to hex instantly with steps and signed mode.Binary to DecimalConvert binary to decimal instantly with steps and signed mode.Decimal to BinaryConvert decimal to binary instantly with steps and signed mode.Two's Complement CalculatorDecimal to two's complement binary and back for 4-64 bits, with invert-and-add-1 steps.XML to CSV ConverterConvert XML to CSV: detects repeating records, flattens nested data, pick your columns.CSV to XML ConverterConvert CSV to well-formed XML with custom root and row names, escaping and pretty print.TOML to JSON ConverterConvert TOML to JSON and JSON to TOML with a full v1.0 parser and clear error lines.CSV Diff CheckerCompare two CSV files by key column and see added, removed and changed rows cell by cell.CSV Duplicate Row RemoverRemove duplicate rows from a CSV by all or selected columns and download the cleaned file.CSV to HTML TableTurn CSV into clean HTML table code with a live preview, styling options and one-click copy.CSV to Markdown TableConvert CSV to a neatly aligned GitHub Markdown table with column alignment and live preview.CSV TransposeSwap rows and columns of CSV, TSV or pasted spreadsheet data, with delimiter auto-detect.Date Format ConverterConvert any date to ISO 8601, RFC 2822, Unix time and custom strftime, moment or Java patterns.ENV to JSON ConverterConvert .env files to JSON or YAML and JSON back to .env, with quotes and multiline values.File to Base64Convert any file to a Base64 string or data URI with MIME detection, line wrap and download.HTML Table to CSVExtract any table from HTML or page source to CSV, TSV or JSON, with colspan and rowspan handled.IEEE 754 Floating Point ConverterConvert decimals to 32/64-bit IEEE 754 floats: toggle bits, see hex, exact value and rounding error.INI to JSON ConverterConvert INI and CFG files to JSON and JSON back to INI, with sections, arrays and types.IP Address ConverterConvert IPv4 to decimal, hex, binary, octal and back, with class and private/public check.ISBN Converter & ValidatorConvert ISBN-10 to ISBN-13 and back, validate check digits and hyphenate, one or in bulk.JSON Flatten / UnflattenFlatten nested JSON to dot or bracket path keys, or unflatten flat keys back to nested JSON.JSON to Dart ClassTurn JSON into Dart model classes with fromJson, toJson, null safety and nested classes.JSON to Java ClassTurn JSON into Java POJOs or records with Lombok, getters/setters and Jackson or Gson annotations.JSON to Kotlin Data ClassTurn JSON into Kotlin data classes for kotlinx.serialization, Gson, Moshi or Jackson.JSON to Markdown TableTurn a JSON array of objects into a GitHub Markdown table with column picker and alignment.JSON to PHP ArrayConvert JSON to PHP array code (short [] or array()) and PHP arrays back to JSON.JSON to Rust StructTurn JSON into Rust structs with serde derives, rename attributes, Option and Vec types.JSON to SQL ConverterConvert a JSON array of objects to CREATE TABLE and INSERT statements for MySQL, Postgres, SQLite.JSON to Swift StructTurn JSON into Swift Codable structs with CodingKeys, optionals and nested types.JSON to TOML ConverterConvert JSON to clean TOML with tables, arrays of tables, inline tables and dates.JSONL to JSON ConverterConvert JSON Lines / NDJSON to a JSON array and back, with line-level error reports.Properties to YAML ConverterConvert Java .properties to nested YAML (application.yml) and YAML back to properties.PX to EM ConverterConvert pixels to em using the parent font size, and em back to px, with conversion tables.Query String to JSONConvert URL query strings to JSON with nested brackets and arrays, and JSON back to a query string.REM to PX ConverterConvert CSS rem values to pixels for any root font size, with a quick 0.25–6rem table.SQL to JSON ConverterConvert SQL INSERT statements and dumps into a JSON array of row objects, with CSV export.TSV to CSV ConverterConvert TSV to CSV and back, or between tab, comma, semicolon and pipe, with correct quoting.
See all 129 Data & File Format Converters →