LocalSEOFlow

What Is KML File and How to Create One Free?

What is a KML file and how do you create one?

A KML file is a text file that stores places on a map: points, lines and shapes, with names and descriptions. Google Earth, Google My Maps and most GIS programs can open it. If you have ever shared a set of pins or a drawn service area, there is a good chance it was a KML file.

For local SEO, KML files are a simple way to map service areas, job locations and branch addresses in a format Google tools understand. They are also easy to make once you know what goes inside.

This guide covers what KML means, how the format works, how to open KML and KMZ files, and how to create one free with the free KML generator.

Key takeaways

  • KML stands for Keyhole Markup Language. It is XML that describes places on a map.
  • A KMZ file is a zipped KML file, often with icons or images inside.
  • Google Earth, Google My Maps and QGIS all open KML and KMZ files.
  • You need latitude and longitude for each point. Addresses must be converted to coordinates first.
  • A KML file generator turns a spreadsheet of up to 2,000 rows into KML or KMZ in seconds.

What Is KML? Quick Definition

KML is a file format for showing geographic data in map programs. It was created by Keyhole, a company Google bought in 2004 whose software became Google Earth. KML is now an open standard managed by the Open Geospatial Consortium.

What Does KML Mean and Stand For?

KML stands for Keyhole Markup Language. Markup language means it is written in tags, like HTML. The tags describe placemarks, their names, their coordinates and how they should look.

What Is KML Format? What Goes Inside the File

KML format is XML text with a Document that holds Placemarks, and each Placemark has a name, an optional description and a geometry: a Point, a LineString or a Polygon. Coordinates are written as longitude, latitude, in that order, which trips up many people.

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <Placemark>
      <name>Main office</name>
      <Point><coordinates>-97.7431,30.2672</coordinates></Point>
    </Placemark>
  </Document>
</kml>
Watch out: Longitude comes first in KML. If your pins land in the ocean, you probably swapped the two numbers.

What Is the Difference Between KML and KMZ?

A KMZ file is a KML file compressed into a ZIP, sometimes with icons, images or other files bundled inside. It is smaller and easier to email. Google Earth and My Maps open both. If you want to edit the text, use KML. If you want to share, KMZ is usually better.

KMLKMZ
What it isPlain XML textZipped KML plus extras
SizeLargerSmaller
Edit in a text editorYesUnzip first
Best forEditing and version controlSharing and email

How Can I Open a KML File? Free Programs That Work

Open it in Google Earth, import it into Google My Maps, or load it in a GIS program like QGIS. All of these are free. On a computer without any map program, you can also open a KML file in any text editor to read the raw data.

  • Google Earth (web or desktop): open the menu, choose Projects, then import the KML file.
  • Google My Maps: create a map, click Import on a layer and pick the file.
  • QGIS: drag the file into the map window.
  • Text editor: open it to see or fix the XML by hand.

How to Open KMZ Files on Any Device

Google Earth and Google My Maps open KMZ files directly. If a program only accepts KML, rename the .kmz file to .zip, unzip it, and use the doc.kml file inside. On a phone, the Google Earth app opens KMZ files from email or file storage.

How Do I Create a KML File Free and Fast?

Draw it in Google My Maps and export it, or build it from a spreadsheet with a KML generator. Drawing works for a few pins. A spreadsheet is far faster for dozens or hundreds of locations.

The LocalSEOFlow KML Generator takes up to 2,000 rows of names with latitude and longitude, or one center point for a radius circle, or a list of corners for a polygon. It outputs KML or KMZ and warns you if the file goes over 5 MB, which is a common import limit in map tools. It needs coordinates, so convert addresses to latitude and longitude first.

Create a KML or KMZ file

Turn up to 2,000 rows into map pins, draw a service radius or a polygon, and download KML or KMZ. Free.

Create KML

How Do Local Businesses Use KML Files?

Local businesses use KML files to map service areas, show job locations and keep branch locations organized in Google My Maps. A radius circle around your shop is a quick visual of where you work. A layer of past job pins shows real coverage.

KML files are a planning and sharing tool. Uploading a KML file does not change your Google rankings by itself, and it does not set your Business Profile service areas. For those, see how to find ZIP codes within a radius, which turns a radius into named places Google accepts.

Frequently asked questions

How can I open a KML file?

Open it in Google Earth, import it into Google My Maps, or load it in QGIS. All three are free. You can also read the raw data in any text editor.

How do I create a KML file?

Draw places in Google My Maps and export the layer as KML, or paste a spreadsheet of names and coordinates into a KML generator and download the file.

Can I convert a KML file to PDF?

Not directly. Open the KML in Google Earth or My Maps, then print the map view to PDF with your browser or the program's print option.

What program opens KML files?

Google Earth, Google My Maps, QGIS, ArcGIS and most GPS and mapping apps. Any text editor can open it as plain text.

Is KML the same as GPX?

No. Both store map data, but GPX is mainly for GPS tracks and waypoints, while KML also handles styled shapes, areas and descriptions for map display.

Can I make a KML file from addresses?

You need coordinates for each place. Convert addresses to latitude and longitude with a geocoding tool first, then build the KML from those numbers.

Free tools for this

Related guides