Convert Excel (XLSX) to GeoJSON

This converter turns an Excel .xlsx sheet with latitude and longitude or X/Y columns into GeoJSON points, keeping the other columns as properties with their numbers, text and dates. The workbook is read in your browser and is not uploaded. The first row must be the header, coordinates can be decimal numbers or degrees, minutes and seconds, and old Excel 97-2003 .xls files work too.

Did a file not convert correctly? E-mail [email protected], ideally with a small sample file, and it will be fixed.

Key facts

Excel (XLSX) to GeoJSON: why convert

Lists of shops, sample sites, customers or assets are often kept in Excel with one column for the latitude and one for the longitude. To put them on a web map, in Leaflet, Mapbox or geojson.io, they need to be GeoJSON. This converter reads your .xlsx workbook, finds the sheet with coordinates and the columns that hold them, and turns every row into a point with all the other columns as properties. Cell types from Excel carry over: numbers stay numbers, text stays text (a postcode such as 0150 keeps its zero) and dates are written as 2024-05-01. If the columns are named differently, pick them yourself; projected X/Y values such as UTM work too when you enter their EPSG code. You see the points on a map before you download.

How to convert Excel (XLSX) to GeoJSON

  1. Drop your .xlsx or .xls file in the box, or click to choose it.
  2. Check the coordinate columns the converter picked, and change them if needed.
  3. Look at the points on the map, then click Convert to GeoJSON and download the file.

What changes when you convert

Which sheet is read

A workbook can have many sheets. The converter reads the first sheet whose header row has coordinate columns, such as Latitude and Longitude, Lat and Lon or X and Y, and tells you which sheets it skipped. If none is recognised, it uses the first sheet with data and lets you pick the columns.

The first row must be the header

Every sheet is read with its first row as column names. Titles, notes or empty rows above the header turn into column names and make the data hard to read, so delete them in Excel first. Formulas are read as their last calculated values, and a merged cell has its value only in its first cell.

Decimal degrees or degrees, minutes and seconds

Latitude and longitude can be numbers such as 55.6761 or text in degrees, minutes and seconds such as 55°40'34"N, or in degrees and decimal minutes such as N 55° 40.567', with N, S, E or W for the hemisphere. A single column holding both, such as 55.6761, 12.5683 copied from Google Maps, is split into latitude and longitude. Rows with an empty or invalid coordinate are kept with "geometry": null, and the converter says how many there are.

Old .xls files and web exports

Excel 97-2003 workbooks ending in .xls are read like .xlsx files, with their formula results, dates and sheets. Many web sites and older programs export an HTML table or tab-separated text with an .xls name; those are read too. An .xls with a password to open is encrypted and cannot be read: save a copy without the password first.

About the formats

Excel (XLSX)

XLSX is the workbook format of Microsoft Excel since Excel 2007, also written by LibreOffice, Numbers and Google Sheets. Address lists, sample sites and asset registers often live in a spreadsheet with a latitude and a longitude column, but a spreadsheet is not map data until those columns become points.

  • A workbook can hold several sheets; each sheet is one table with a header row.
  • Cells keep their type: numbers, dates and text, so a postcode like 0150 can keep its leading zero.
  • There is no geometry and no coordinate system; coordinates are just numbers in columns.
  • The older .xls format (Excel 97-2003) is a different, binary format.

GeoJSON

GeoJSON is a plain-text JSON format for geographic features, standardized as RFC 7946 in 2016. It is the native format of web maps such as Leaflet, MapLibre and Mapbox, and of many APIs.

  • Coordinates are WGS84 longitude, latitude (in that order).
  • Points, lines and polygons can be mixed in one file.
  • Properties can be any JSON value, with no limit on field name length.

Frequently asked questions

Is my spreadsheet uploaded?

No. The workbook is read by your browser with GDAL compiled to WebAssembly, on your own device.

Which column names are recognised?

Names starting with lat, lon, lng or long, and X, Y, easting and northing, in any letter case. A column of WKT text such as POINT (12.57 55.68) is recognised as well.

Does it work with Google Sheets or LibreOffice?

Yes. Download or save the sheet as .xlsx (Microsoft Excel) and drop that file here.