> For the complete documentation index, see [llms.txt](https://docs.mapbox.com/help/llms.txt)

# KML

**KML** is a file format that is commonly used in Google products. KML is similar to [GeoJSON](https://docs.mapbox.com/help/glossary/geojson/) and can store points, lines, polygons, and other vector data. Unlike GeoJSON, it's based on [XML](https://en.wikipedia.org/wiki/XML) rather than [JSON](http://www.json.org/).

You can upload a KML file to [Mapbox Studio](https://docs.mapbox.com/studio-manual/) to create a vector [tilesets](https://docs.mapbox.com/help/glossary/tileset/), which you can then use in a custom map style to display data on a map.

It is important to note that when you create a KML file, the additional custom attributes go into an [<extendedData>](https://developers.google.com/kml/documentation/extendeddata) element. Mapbox is unable to use the contents of that element to create attributes for the tileset, so if you want to upload a tileset with custom attributes, [GeoJSON](https://docs.mapbox.com/help/glossary/geojson/) may be a more appropriate format. You can use a tool like [`togeojson`](https://www.npmjs.com/package/@mapbox/togeojson), or [QGIS](https://qgis.org/en/site/forusers/download.html) to convert your file from a KML to a GeoJSON.

Below is an example of a KML file that contains two points with custom attributes representing two music venues in New York City.

```
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <Placemark>
      <ExtendedData>
        <Data name="LOCATION"><value>Radio City Music Hall</value></Data>
        <Data name="Map"><value>(-73.97858810595615,40.759533832684184)</value></Data>
      </ExtendedData>
      <Point>
        <coordinates>-73.97858810595615, 40.759533832684184</coordinates>
      </Point>
    </Placemark>

    <Placemark>
      <ExtendedData>
        <Data name="LOCATION"><value>Webster Hall</value></Data>
        <Data name="Map"><value>(-73.98917174706688, 40.73168230020167)</value></Data>
      </ExtendedData>
      <Point>
        <coordinates>-73.98917174706688, 40.73168230020167</coordinates>
      </Point>
    </Placemark>
  </Document>
</kml>
```

If you would like to download a sample KML file with a larger set of points, click the download button below. It contains a set of farmers markets, listing their locations and which days they are open:

[Download sample KML](https://docs.mapbox.com/help/help/data/farmers_markets.kml)

**Related resources:**

-   [KML documentation](https://developers.google.com/kml/documentation/kmlreference)
-   Studio Manual [geospatial data page](https://docs.mapbox.com/studio-manual/overview/geospatial-data/): transfer limits for uploading KML files as tilesets
-   Example KML file: