# Map from Excel or CSV

> Drop a spreadsheet with latitude and longitude columns and see every row on a map. Download it as GeoJSON or KML. Free, and no account needed.

Open the tool: https://spatibase.com/tools/csv-to-map/

The Spatibase map maker turns an Excel (.xlsx) or CSV file into a map in your web browser, one point per row, and downloads it as GeoJSON or KML (for Google Earth and GIS apps). It’s free with no account and no sign-up, and your file is read on your computer, never uploaded.

What it does with your sheet:

- **Finds the coordinates.** It picks the latitude and longitude columns by their names. Decimal commas such as `41,3874` work.
- **Every column kept.** All the other columns come along in the GeoJSON or KML.
- **Skipped rows explained.** Every row it couldn’t place is listed with the reason: an empty cell, a value that isn’t a number, coordinates out of range or likely swapped.
- **Limits.** Files up to 50 MB and 50,000 rows.

## What it does
- Make a map from an Excel (.xlsx), CSV, TSV or TXT file
- Finds the latitude and longitude columns by their names
- Reads decimal commas and semicolon-separated files from European Excel
- Lists the rows it couldn’t place, with the reason
- Convert CSV to KML for Google Earth
- Convert Excel or CSV to GeoJSON
- Runs in the browser: nothing is uploaded

## How to make a map from Excel
1. Make sure your sheet has a header row and a latitude and a longitude column (the next section shows how to get them). Not ready yet? Download the sample file above and open it in Excel to see the layout.
2. Save it as .xlsx or CSV, then drop the file on the box above, or press Choose a file.
3. Look at the map. Click a point to see its row. If some rows couldn’t be placed, the list under the map says which and why.
4. Fix those rows in your sheet and drop the file again, as often as you like.
5. Download the map as GeoJSON or KML, or copy the GeoJSON.

## Formats and limits
- **Opens:** .xlsx (the first sheet with data), .csv, .tsv and .txt, up to 50 MB and 50,000 rows. Old .xls, .numbers and .ods files: save them as .xlsx or CSV first.
- **Needs:** a header row, a latitude and a longitude column in decimal degrees (dot or decimal comma). Addresses are not looked up.
- **Outputs:** GeoJSON (FeatureCollection of points), KML (placemarks with name, description and ExtendedData), CSV (every column plus latitude, longitude and WKT).
- Rows without usable coordinates are listed with the reason, never fixed silently.
- Try it with a sample: https://spatibase.com/tools/csv-to-map/?sample=1
- Download the sample file (the one Open a sample opens): https://spatibase.com/tools/samples/barcelona.xlsx

## What does my spreadsheet need?
A sheet the map can read looks like this:

- **One row per place.** Each row becomes one point on the map.
- **A header row.** The first row holds the column names.
- **Latitude and longitude columns.** In decimal degrees, such as `41.4036` and `2.1744`. Headers like `latitude`, `lat`, `y` and `longitude`, `lng`, `lon`, `long`, `x` are recognised in any case, and in a few other languages.
- **Everything else comes along.** Names, categories, prices, opening hours: every other column becomes information about the point.

Real sheets often look a little different. Three common cases:

- **Coordinates from Google Maps.** Right-click a place: the first line of the menu is its latitude and longitude, and a click copies them. Paste the two numbers into their own columns. Degrees and minutes (`41°24′13″N`) have to be converted to decimal degrees first.
- **European Excel files.** Excel set to a European language writes a decimal comma (`41,4036`) and separates columns with semicolons. Both are read correctly, so save the file as it is.
- **Only addresses?** This page can’t place them: it never sends your data anywhere to look addresses up. Spatibase can, when you import the file into a project (up to 250 addresses per import).

## Put the map on your own website
The GeoJSON you download here works with any web map library. With MapLibre GL JS, which this page uses for its preview, these lines show your places on a map.

```js
import maplibregl from 'maplibre-gl'
import 'maplibre-gl/dist/maplibre-gl.css'

// <div id="map" style="height: 400px"></div> on the page
const map = new maplibregl.Map({ container: 'map', style: 'https://demotiles.maplibre.org/style.json', center: [2.17, 41.39], zoom: 12 })
map.on('load', () => {
  map.addSource('places', { type: 'geojson', data: '/places.geojson' }) // the file you downloaded here
  map.addLayer({ id: 'places', type: 'circle', source: 'places', paint: { 'circle-radius': 6, 'circle-color': '#e4572e' } })
})
```

Convert the spreadsheet to GeoJSON in code: https://spatibase.com/tools/csv-to-geojson.md

## Frequently asked questions
### Is my spreadsheet uploaded?
No. The file is read by your browser, on your computer. Nothing is sent to Spatibase or anyone else. Only the map background (the streets and labels) is loaded from the internet.

### Can Excel plot points on a map by itself?
Not as pins on a street map. Excel’s Filled Map chart colours whole countries, states or postcodes. 3D Maps (Insert → 3D Map, in Excel for Windows) can plot latitude and longitude, but the map stays inside the workbook. Here you get a map in seconds and a GeoJSON or KML file that other apps open.

### Why were some rows skipped?
A row is placed only when it has a usable latitude and longitude. The list under the map names every skipped row and why: a cell is empty, it isn’t a number, the value is out of range (latitude goes from -90 to 90, longitude from -180 to 180), or latitude and longitude look swapped. Nothing is fixed silently: correct the sheet and drop it again.

### My sheet has addresses, not coordinates. What can I do?
This page only reads coordinates, because looking up addresses would mean sending them to a service. Spatibase looks up addresses when you import a CSV into a project, up to 250 per import. You can also get coordinates for a few places by right-clicking them in Google Maps.

### Can I see my spreadsheet in Google Earth too?
Yes: open the CSV here and press Download KML. Every row becomes a placemark with its name, and the other columns go into its data (ExtendedData), which Google Earth shows when you click the placemark. Google My Maps can import a CSV or Excel sheet directly, so you only need the KML for Google Earth and other apps.

### Is there a limit?
Yes: 50 MB and 50,000 rows per file. Everything runs on your computer, so very big files can be slow. For .xlsx files the first sheet with data is used. Old .xls files and Numbers or LibreOffice files need to be saved as .xlsx or CSV first.

## Next step
Turn the spreadsheet into a live map your team can edit: **Save to Spatibase (free)** on the page saves its places to a free Spatibase project (https://app.spatibase.com/signup), on a map you can edit and with a live GeoJSON address for your site. Or import it by hand: the CSV itself (the importer reads CSV and TSV, up to 10,000 rows, and can look up addresses), or the GeoJSON you download here for an Excel file (https://spatibase.com/docs/content/import/).
