All converters
HomeSpreadsheet to map › CSV to GeoJSON

Convert CSV to GeoJSON

By , GIS & remote-sensing practitioner · Reviewed

Convert CSV to GeoJSON right in this tab and feed plain spreadsheet rows to Leaflet, Mapbox or any web-mapping stack. Parsing happens locally in your browser, which means the coordinate table never travels to a server.

Drop a file here, or click to browse

KML, KMZ, SHP (.zip), GeoJSON, GPKG, GML, GPX, DXF, CSV, Excel, and more

No uploadNo trackingOpen standards (GDAL/OGR)Works offline once loaded

No CSV file to hand? Download a sample CSV file (100 points) and drop it above to see the conversion.

How to convert CSV to GeoJSON

  1. Drag your CSV file onto the drop zone above.
  2. Confirm which columns hold the location: the tool auto-detects latitude/longitude headers and prefers a WKT column when it finds one.
  3. Select GeoJSON, click Convert, and download an RFC 7946 FeatureCollection with every other column kept as properties.

What changes when you convert CSV to GeoJSON

Every format stores different things, so a conversion is never perfectly loss-free. Here is exactly what carries over when you convert CSV to GeoJSON, and what to watch for.

WhatCSV → GeoJSON
GeometryKeptPoints, lines and polygons are preserved exactly, including multi-part shapes.
AttributesKeptEvery column and full field name moves from CSV into GeoJSON untouched.
Styling & labelsKeptNeither CSV nor GeoJSON stores visual styling, so there is nothing to lose, the geometry and data carry straight over.
Coordinate systemChangesCSV carries no coordinate system, so values are read as WGS84 longitude/latitude (EPSG:4326), which GeoJSON requires. Set a source CRS if your data is in metres.
Elevation (Z)KeptCSV is 2D, so there is no elevation to carry (add a Z/elevation column if you need one).
File structureKeptA single, self-contained .geojson file you can move around on its own.

What your spreadsheet needs first

You do not need to be a GIS expert to convert CSV to GeoJSON. Your sheet needs just two things: a column of latitudes and a column of longitudes, and each row then becomes a GeoJSON point feature for your web map. Everything else, names, notes, dates, ID numbers, rides along as attributes on each point.

A correctly formatted CSV spreadsheet for mapping: a name column plus latitude and longitude columns in decimal degrees, one row per place
A mappable sheet: latitude and longitude columns in decimal degrees, one row per place.

The columns that matter

Store the coordinates as plain decimal degrees, like 33.6844 and 73.0479. If your values look like 33°41'04"N instead, convert them first with the coordinate converter. CSV to GeoJSON works with .xlsx, .xls, .csv and Google Sheets exports, and if the wrong column is picked you can fix it from the dropdowns before converting.

Why convert CSV to GeoJSON?

People keep tabular data in CSV because spreadsheets are easy to edit. So a list of addresses, sensor readings, or store locations usually starts life as columns of text. However, a web map cannot draw a spreadsheet. It needs vector features with geometry and attributes, which is exactly what GeoJSON provides. Converting CSV to GeoJSON turns each row into a point feature that Leaflet, Mapbox GL, or OpenLayers can render directly. GeoJSON is also plain JSON, so you can pass it through web APIs and diff it in version control. This is the standard first step from a raw table to a live web map.

Coordinate system handling

A spreadsheet has no coordinate system of its own. CSV rows are read as WGS84 longitude/latitude (EPSG:4326) unless you tell the tool otherwise. If your coordinates are projected, for example UTM eastings and northings in metres, pick the matching CRS before converting so the points land in the right place instead of near Null Island.

GeoJSON is defined in WGS84 (EPSG:4326), so the output is reprojected to longitude/latitude, exactly what Google Earth and web maps expect. A quick CRS check before you download saves the classic "my CSV data is in the wrong place" surprise; the guide on coordinate systems and EPSG codes goes deeper.

What to check when converting CSV to GeoJSON

Check your coordinate columns before converting. A CSV only becomes spatial when it carries latitude and longitude, an X/Y pair, or geometry as WKT. Rows without valid coordinates are simply skipped, so a mistyped or blank cell means a missing point. Also confirm your values are in WGS84, since RFC 7946 GeoJSON expects EPSG:4326. Remember GeoJSON lists coordinates as longitude then latitude, the opposite of everyday habit.

Which software opens the result

CSV files typically come out of Excel, Google Sheets, QGIS, pandas. Once you convert to GeoJSON, the file opens in web maps built on Leaflet, Mapbox GL or OpenLayers, and desktop tools like QGIS. The GeoJSON output follows the standard specification exactly, so those programs read it without any special import settings.

Troubleshooting CSV to GeoJSON

About the formats

CSV is where tabular data usually starts, whether exported from Excel, a Google Sheet, or a pandas script. GeoJSON is where a web map wants it. This conversion reads the coordinate columns in each row and wraps every point as a feature, turning flat spreadsheet rows into structured vector data. Once converted, the result drops straight into Leaflet or Mapbox GL, so the pairing bridges the gap between analysts editing rows and developers rendering maps.

Frequently asked questions

Do my CSV column headers become GeoJSON properties?

Yes. Every non-coordinate column is written into each feature's properties object, keyed by its header name. The latitude and longitude columns are consumed to build the geometry instead.

Can I load the GeoJSON straight into Leaflet or Mapbox GL?

Yes. The output follows RFC 7946, so you can pass it to Leaflet's L.geoJSON or a Mapbox GL geojson source with no extra step, as long as your coordinates were in WGS84.

What happens to my other spreadsheet columns?

Every non-coordinate column becomes a property on the matching GeoJSON feature. Names, dates, and numeric fields carry over per row. That means you can style or filter features in Leaflet using the same attributes you edited in Excel.

Can I build lines or polygons, not just points?

A plain latitude/longitude pair only produces point features, one per row. To output line or polygon geometry, put a WKT string in a geometry column and it will be parsed instead. Typically point output is enough for sensor tables and address lists.

What can open a GeoJSON file after converting?

A GeoJSON file opens in web maps (Leaflet, Mapbox, OpenLayers) and QGIS. Because the output follows the standard specification, any tool that supports GeoJSON will read it without special settings.

Does converting CSV to GeoJSON lose any data?

No conversion is perfectly loss-free because each format stores different things, but geometry and attributes are preserved; only presentation-level styling (which GeoJSON does not store) is left behind.

Related converters

Related reading