Logo
Back to Documentation

KML Import Guide

Import maps from Google Earth and Google My Maps using KML/KMZ files, with support for folders, descriptions, and styling

Last updated: January 17, 2026

KML Import Guide

Already have a map in Google Earth or Google My Maps? Import it to Mapiry using KML files. KML (Keyhole Markup Language) is the standard format used by Google's mapping tools.

What is KML?

KML is an XML-based file format for geographic data used by:

  • Google Earth - 3D globe visualization
  • Google My Maps - Custom map creation
  • Many GIS applications - ArcGIS, QGIS, etc.

KML can contain:

  • Points (locations/placemarks)
  • Folders (become categories)
  • Descriptions
  • Colors and styling

๐Ÿ’ก Tip: KML preserves folder organization and styling that CSV doesn't!

When to Use KML Import

Use KML import when:

  • Migrating from Google My Maps
  • You have Google Earth data
  • Your data is organized in folders
  • Locations have styled markers with colors

Use CSV import instead when:

  • You have data in spreadsheets
  • Source is a database export
  • You need simple tabular data

See our CSV Import Guide for spreadsheet imports.

Exporting KML from Google My Maps

Step 1: Open Your Map

  1. Go to Google My Maps
  2. Click on the map you want to export

Step 2: Export KML

  1. Click the three-dot menu (โ‹ฎ) next to the map title
  2. Select "Export to KML/KMZ"
  3. Choose your settings:
    • โ˜‘๏ธ Export all (includes all layers)
    • โ—‹ KML format (not KMZ)
  4. Click "Download"

๐Ÿ’ก Tip: Choose KML (not KMZ) for easier troubleshooting if import issues occur.

Exporting KML from Google Earth

Google Earth Pro (Desktop)

  1. Open Google Earth Pro
  2. In the Places panel, find your data
  3. Right-click the folder or placemark
  4. Select "Save Place As..."
  5. Choose format: KML (not KMZ)
  6. Click "Save"

Google Earth Web

  1. Open earth.google.com
  2. Click Projects (folder icon)
  3. Open your project
  4. Click three-dot menu
  5. Select "Export as KML"
  6. Download

Importing KML to Mapiry

Step 1: Prepare Your Map

  1. Open your map in Mapiry (or create a new one)
  2. Make sure you're logged in (anonymous maps don't support KML import)

Step 2: Upload KML File

Look for the KML import feature in your map editor and upload your .kml or .kmz file.

Supported:

  • KML files (.kml)
  • KMZ files (.kmz) - automatically unzipped

Step 3: Import Process

Mapiry will:

  1. Parse your KML file
  2. Extract all placemarks (points)
  3. Convert folders to categories
  4. Extract colors from styles
  5. Create locations with descriptions
  6. Assign categories to locations

Step 4: Review Results

After import:

  • Check the number of locations imported
  • Verify categories were created correctly
  • Review a few locations to ensure data imported properly

What Gets Imported

Supported KML Elements

โœ… Placemarks (Points):

  • Name
  • Description (HTML stripped to plain text)
  • Coordinates (latitude, longitude)
  • Style colors (converted to hex)

โœ… Organization:

  • Folders โ†’ Categories
  • Folder colors applied to categories
  • Parent folder determines location category

โœ… Extended Data:

  • Address field (added to description)
  • Category field (if present)

Not Supported

โŒ Geometric Features:

  • LineStrings (paths) - Mapiry only supports points
  • Polygons (areas) - Not supported
  • Ground overlays
  • 3D models

โŒ Advanced Styling:

  • Custom icon URLs - Colors only
  • Icon scale/size
  • Label styles beyond color

โŒ Other:

  • Time-based animation
  • Camera views
  • Network links

๐Ÿ’ก Note: Unsupported features are simply skipped. Your location data still imports successfully!

How KML Import Works

Folder to Category Conversion

KML folders automatically become Mapiry categories:

Example:

KML Structure:
- Restaurants (folder)
  - Italian Restaurant
  - Mexican Restaurant
- Hotels (folder)
  - Downtown Hotel

Becomes in Mapiry:
- Restaurants category (contains Italian & Mexican restaurants)
- Hotels category (contains Downtown Hotel)

Color Extraction

  • KML icon colors are converted to hex (#rrggbb format)
  • Applied to created categories
  • If no color specified, default colors are used

Description Handling

  • HTML in descriptions is stripped to plain text
  • CDATA wrappers are removed
  • Line breaks and basic formatting preserved
  • If address is found in extended data, it's added to description

Multiple Layers

Google My Maps "layers" are treated as folders and become categories.

Best Practices

1. Clean Up Before Export

Before exporting from Google My Maps:

  • Remove unnecessary folders
  • Delete duplicate locations
  • Check for missing names/descriptions
  • Organize into logical layers

2. Use Descriptive Folder Names

Folder names become category names:

  • โœ… "Italian Restaurants" (clear)
  • โŒ "Layer 1" (unclear)

3. Test with Small KML First

If importing hundreds of locations:

  1. Create a test KML with 5-10 locations
  2. Import and verify
  3. Once it works, import full file

4. Review After Import

After import completes:

  1. Check location count is correct
  2. Click random locations to verify data
  3. Verify categories created properly
  4. Check marker colors match expectations

5. Organize Categories After Import

After import, you can:

  • Adjust category colors
  • Rename categories
  • Move locations between categories
  • Delete unwanted categories

Common Issues & Solutions

"Invalid KML format" error

Problem: File is corrupted or not valid KML

Solutions:

  • Verify file extension is .kml or .kmz
  • Re-export from Google My Maps/Earth
  • Open KML in text editor to check it's XML
  • Make sure download completed (not a preview page)

No locations found

Problem: KML contains only paths/polygons, not points

Solutions:

  • Check what's in your KML (open in Google Earth)
  • Convert paths to points before export
  • Create placemarks at key points
  • Mapiry only supports point/placemark data currently

Descriptions are garbled

Problem: Encoding issue with special characters

Solutions:

  • Ensure KML uses UTF-8 encoding
  • Re-export from source application
  • Check for <?xml version="1.0" encoding="UTF-8"?> at top of file

Folders not converted to categories

Problem: KML has no folder structure

Solutions:

  • Verify KML has folders (open in Google Earth to check)
  • Flat KML files (no folders) import without categories
  • Add categories manually after import

Locations in wrong places

Problem: Coordinates imported incorrectly

Solutions:

  • Open KML in Google Earth to verify coordinates
  • KML should use WGS84 datum (standard)
  • Check if there's a consistent offset

Some locations missing

Problem: Fewer locations than expected

Solutions:

  • Check for locations with missing names
  • Look for invalid coordinates
  • Check for nested folders (may be flattened)
  • Placemarks without coordinates are skipped

KMZ Files

KMZ is just a compressed KML file (ZIP format):

Option 1: Upload KMZ directly

  • Mapiry automatically unzips and imports

Option 2: Manual extraction

  1. Change extension to .zip
  2. Unzip/extract
  3. Find doc.kml inside
  4. Import the KML file

Converting Formats

KML to CSV

If you prefer CSV import:

  1. Export KML from Google
  2. Use online converter (MyGeodata Cloud, GPS Visualizer, KML2CSV)
  3. Download CSV
  4. Import to Mapiry using CSV Import

CSV to KML

To move data to Google My Maps:

  1. Create CSV with your data
  2. Use online converter (CSV to KML Converter, GPS Visualizer)
  3. Import KML to Google My Maps

Limitations

What KML import does NOT support:

  • โŒ No anonymous map imports - must be logged in
  • โŒ No advanced import options/settings UI
  • โŒ No custom icon preservation - colors only
  • โŒ No HTML description preservation - converted to plain text
  • โŒ No extended data field mapping - only address and category recognized
  • โŒ No paths/polygons - points only
  • โŒ No batch processing - one file at a time
  • โŒ No duplicate detection - duplicates will be imported
  • โŒ No update mode - creates new locations only

Example Workflow

Migrating from Google My Maps

Goal: Move your map from Google to Mapiry

Step 1: Export (2 minutes)

  1. Open map in Google My Maps
  2. Three-dot menu > Export to KML/KMZ
  3. Choose KML format, Export all
  4. Download file

Step 2: Create Mapiry Map (1 minute)

  1. Log into Mapiry
  2. Create new map
  3. Give it the same title

Step 3: Import (2 minutes)

  1. Use import feature
  2. Upload your KML file
  3. Wait for processing

Step 4: Review (5 minutes)

  1. Check all locations imported
  2. Verify categories
  3. Adjust colors if needed
  4. Make map public

Total time: ~10 minutes!

KML vs CSV Comparison

FeatureKMLCSV
Preserves foldersโœ… Yes (โ†’ categories)โŒ No
Preserves colorsโœ… YesโŒ No
Rich descriptionsโš ๏ธ HTML strippedโœ… Plain text
Easy to editโŒ XML is complexโœ… Spreadsheet
Best for...Google Earth/MapsDatabases, spreadsheets

๐Ÿ’ก Recommendation:

  • Migrating from Google? Use KML
  • Starting with spreadsheet? Use CSV
  • Need to edit first? Convert KML to CSV, edit, then import

What's Next?

Related Articles