Free KML sample, test and dummy files
The XML format of Google Earth for placemarks, paths and polygons. Download valid KML test files in 19 exact sizes, from 1 KB to 100 MB, each with a checksum. Or create one of any size up to 1 GB.
- Extension
- .kml
- MIME type
- application/vnd.google-earth.kml+xml
- Kind
- Text
- Category
- GIS
Create a KML file of any size
Choose any size from 400 bytes to 1 GB. The file is made in your browser, so nothing is downloaded from our server. Smaller files usually finish quickly; generation time depends on your device and format. Larger ones are streamed straight into your downloads list in browsers that support it (current Chrome, Edge and Firefox on computers and Android); elsewhere, such as Safari and every browser on iPhone and iPad, the largest size is lower and is shown below.
KML files by size
Every file below is a valid Keyhole Markup Language file of exactly the stated size. Open a file's page for its checksum and contents, and to preview it in your browser before downloading.
| File | Size | Contents | Download |
|---|---|---|---|
| 1 KB KML samplesample-kml-1kb.kml | 1 KB1,024 bytes | Placemarks: 2 | Download KML |
| 5 KB KML samplesample-kml-5kb.kml | 5 KB5,120 bytes | Placemarks: 19 | Download KML |
| 10 KB KML samplesample-kml-10kb.kml | 10 KB10,240 bytes | Placemarks: 42 | Download KML |
| 25 KB KML samplesample-kml-25kb.kml | 25 KB25,600 bytes | Placemarks: 108 | Download KML |
| 50 KB KML samplesample-kml-50kb.kml | 50 KB51,200 bytes | Placemarks: 219 | Download KML |
| 100 KB KML samplesample-kml-100kb.kml | 100 KB102,400 bytes | Placemarks: 440 | Download KML |
| 200 KB KML samplesample-kml-200kb.kml | 200 KB204,800 bytes | Placemarks: 882 | Download KML |
| 500 KB KML samplesample-kml-500kb.kml | 500 KB512,000 bytes | Placemarks: 2,199 | Download KML |
| 1 MB KML samplesample-kml-1mb.kml | 1 MB1,048,576 bytes | Placemarks: 4,495 | Download KML |
| 2 MB KML samplesample-kml-2mb.kml | 2 MB2,097,152 bytes | Placemarks: 8,984 | Download KML |
| 3 MB KML samplesample-kml-3mb.kml | 3 MB3,145,728 bytes | Placemarks: 13,442 | Download KML |
| 5 MB KML samplesample-kml-5mb.kml | 5 MB5,242,880 bytes | Placemarks: 22,341 | Download KML |
| 10 MB KML samplesample-kml-10mb.kml | 10 MB10,485,760 bytes | Placemarks: 44,591 | Download KML |
| 15 MB KML samplesample-kml-15mb.kml | 15 MB15,728,640 bytes | Placemarks: 66,844 | Download KML |
| 20 MB KML samplesample-kml-20mb.kml | 20 MB20,971,520 bytes | Placemarks: 89,091 | Download KML |
| 25 MB KML samplesample-kml-25mb.kml | 25 MB26,214,400 bytes | Placemarks: 111,242 | Download KML |
| 30 MB KML samplesample-kml-30mb.kml | 30 MB31,457,280 bytes | Placemarks: 133,303 | Download KML |
| 50 MB KML samplesample-kml-50mb.kml | 50 MB52,428,800 bytes | Placemarks: 221,547 | Download KML |
| 100 MB KML samplesample-kml-100mb.kml | 100 MB104,857,600 bytes | Placemarks: 442,154 | Download KML |
What is a KML file?
KML describes things to draw on a map or a globe: placemarks with a name and a description, paths, polygons, image overlays and the styles used to render them. It began at Keyhole, the company whose viewer became Google Earth, and has been an Open Geospatial Consortium standard since 2008.
A KML file is ordinary XML. Coordinates are written as longitude, latitude and an optional altitude, separated by commas, with a space between one position and the next. A .kmz file is a ZIP archive containing a KML file and any images it uses.
How to recognise a KML file
KML files have no file signature, the magic bytes that most binary formats begin with.
No signature bytes. KML files are identified by parsing their content.
| Extension | .kml |
|---|---|
| MIME type | application/vnd.google-earth.kml+xml |
| Standard | OGC KML 2.2 and 2.3 |
| Root element | <kml> in the namespace http://www.opengis.net/kml/2.2 |
| Coordinate order | Longitude, latitude, altitude |
| Reference system | WGS 84 |
What to test for
These are the behaviours that most often go wrong when software handles KML files.
- Longitude comes first. Reading the pair the other way round moves every point to a different part of the world.
- Inside a position, a space after a comma is an error: the space is what separates one position from the next. Hand-edited files often break this rule.
- KML can pull in remote content through network links and icon URLs. An importer should not fetch them blindly. The samples here refer to nothing outside the file.
Strengths of KML
- Carries styling as well as geometry: icons, colours and line widths.
- Opens directly in Google Earth and most GIS software.
Limitations of KML
- Verbose XML that grows quickly with the number of features.
- Attributes are free-form descriptions unless extended data is used, so they are awkward to query.
Typical uses of KML test files
- Testing map imports and layer rendering
- Checking conversion between KML, GPX and GeoJSON
- Verifying coordinate-order handling
- Load-testing viewers with thousands of placemarks
Software that opens KML
- Google Earth and Google My Maps
- QGIS and ArcGIS
- GDAL and ogr2ogr
- OpenLayers and Leaflet, through plug-ins
Specifications
Related
KML sample files: questions
- What do the KML samples contain?
- Placemarks near sixteen real cities on six continents: mostly points, with a path and a polygon in every ten, and two shared styles.
- Is there a KMZ sample?
- Not at present. A KMZ file is a ZIP archive with a KML file inside, so you can make one by zipping any sample and renaming the result.
- What is the MIME type of a KML file?
- The MIME type is application/vnd.google-earth.kml+xml. The file extension is .kml.
- Is a sample KML file the same as a dummy or example KML file?
- Yes. Sample, test, dummy and example KML files are different names for the same thing: a KML file with known contents that stands in for a real one. Any file on this page will do wherever a tutorial or a test plan asks for a dummy KML file.