KML Validator Galdos Systems Inc.

Frequently Asked Questions

Here are some of the most commonly asked questions about the KML Validator:

About KML

What is KML?

KML (previously known as Keyhole Markup Language) is an XML-based language for specifying three-dimensional geographic and geospatial data. KML uses a tag-based structure, and is the language that Earth browsers use for defining and displaying data. Just as web browsers render HTML, Earth browsers render KML.

Who maintains the KML Standard?

The KML Standard is maintained by the OGC (Open Geospatial Consortium, Inc.®), which is a non-profit, international, voluntary consensus standards organization that is leading the development of standards for geospatial and location-based services. For more details, please refer to

What types of files can I validate?

Any of the following types of files can be validated:

  • application/xml — This is the generic XML media type.
  • application/ — This is a variation of the XML media type specifically for KML.
  • application/ — This is a zip-compressed archive specifically for KML. KMZ archives must contain at least one KML file.
  • application/zip — This is the generic zip archive.

For KML files, the KML Validator will still attempt to validate the document even if the content type or format is incorrect, and it will report errors accordingly.

What is a mime type?

MIME is an abbreviation for Multi-purpose Internet Mail Extensions, which is a standard way of classifying file types on the Internet. Programs such as Web servers and browsers all have a list of MIME types. This supports the transfer of files of the same type in the same way, regardless of the operating system.

A MIME type has two parts, a type and a subtype, which are separated by a slash (/).

If a KML or KMZ file that has been created in Google Earth is having a problem, make sure that the proper MIME type is set for that file.

More details about XML Media Types is available in RFC 3023:

The Internet Assigned Numbers Authority (IANA) maintains a registry of official media types. More information about the different types is available at:

[Back to Top]

About the Validator

What is validation?

Validation checks a KML file against a formal Standard. It performs a similar function to spell checking and proofreading writing for grammar and syntax errors. Validation, however, is much more exact because the Standard is a precisely-specified structure, not a human-defined natural language.

To validate specifically means to check against the requirements and recommendations of a particular Standard using a set of tests derived from that Standard.

Why validate?

Validating a KML file and fixing the issues identified in the validation report will improve the quality of the code.

Better quality code will not only be displayed as intended or expected, but may also be more easily imported into popular GIS software and more consistently rendered in the desired manner in more types of Earth browsers .

How will my KML file be validated?

The Validator performs strict validation of KML files against the latest version of the OGC KML Standard. A set of tests was produced from the Standard, and these tests are run against a submitted KML file. The resulting report is presented through the interface, and can be used to fix or improve the KML file.

Is my KML file stored anywhere?

No. Files submitted to the KML Validator are not saved on any server or file system.

Can the Validator clean up my KML file?

No. Because the Validator does not store any KML files, there is no facility to modify a submitted KML file.

How large a file can I validate?

The larger the size of file that you are trying to validate, the longer the validation process will take. However, because of processing time, the Validator is configured to validate files up to 2 megabytes in size. If you submit a file larger than 2 megabytes, you may get a proxy error or a message that the file was rejected. Proxy errors are most often caused when a KMZ archive that is less than 2 megabytes in size contains a KML file that is larger than 2 megabytes.

[Back to Top]

About Validation

What do the different levels of validation mean?

Level 1 specifications define the most basic requirements that a KML file must meet in order for it to be valid. Level 1 validation tests are based on "shall" statements in the specification. "Shall" statements are ones that must be implemented in order for the KML to be valid.

Level 2 specifications define recommendations that would make a KML file more interoperable between systems and applications. Level 3 specifications define suggestions that would give a KML file the highest level of interoperability, including the importing of KML into popular GIS software. Level 2 and Level 3 tests are based on "should" statements in the specification. "Should" statements are ones that increase the interoperability of the KML.

Will my file still open in an Earth browser?

Even if a KML file fails to validate against the OGC KML 2.2 Specification, it may still be rendered correctly when displayed in an Earth browser. There are a several possible reasons for this:

  • The KML Validator may have inserted a missing namespace prior to validation. Many Earth browsers are not strict in requiring a namespace in the KML file in order to display it.
  • The KML Validator may have replaced a valid namespace with the namespace for OGC KML 2.2. This may cause elements that were valid with respect to the original schema to be invalid with respect to the KML 2.2 schema, thus causing errors. This is most likely to happen with the order of element contained within other elements. See the Help page about Incorrect Element Order for more information.
  • Earth browsers do not always require strictly valid KML code. Downloading and validating a KML file created in an Earth browser will sometimes show where the Earth browser is more relaxed about the KML code that it will display.

[Back to Top]