csvkit.org
CSV (Comma-Separated Values) utilities, in the browser
Say hi →

CSV to GeoJSON

Point features · auto-detected lat/lon columns · range check · pretty or compact

Turn a CSV of coordinates into a GeoJSON FeatureCollection you can drop into Leaflet, Mapbox, QGIS, or a GitHub gist for an instant map. Latitude and longitude columns are detected by name, the remaining columns become feature properties, and coordinates outside valid ranges are flagged — that's almost always swapped lat and lon.

csv → geojson
Or drop a .csv file here, or
ready

How to convert CSV to GeoJSON

  1. Paste the CSV or drop a file. Columns named lat/latitude/y and lon/lng/longitude/x are picked automatically.
  2. Correct the dropdowns if the guess is wrong.
  3. Check the status line — it counts rows skipped for unusable coordinates and values outside valid ranges.
  4. Copy or download the .geojson.

The coordinate order trap

GeoJSON stores coordinates as [longitude, latitude] — longitude first, which is the opposite of how humans say it and of what most CSV columns list. This tool writes the correct order for you from the columns you select. The usual symptom of getting it wrong is every point landing in the ocean off West Africa (near 0°, 0°) or in the wrong hemisphere entirely. Latitude must be within ±90 and longitude within ±180; anything outside that is reported, since a latitude of 120 can only mean the columns are swapped.

Properties and file size

Every column other than the coordinates becomes a property on the feature, typed so numbers stay numbers for styling and filtering expressions. Rounding coordinates trims file size significantly on large sets — six decimal places is about 10 cm of precision, which is more than enough for a map; twelve is noise that just makes the file bigger.

FAQ

Can it make lines or polygons?

No — one row becomes one Point. Building LineStrings or Polygons requires knowing how rows group and order into a shape, which a flat CSV doesn't say. For that, geojsonkit.org works on GeoJSON directly.

My coordinates are in degrees, minutes, seconds.

Convert them to decimal degrees first — this tool reads decimal numbers only. 50°27'00"N must become 50.45.

Why were some rows skipped?

Their coordinate cells were empty or not numeric. The status line counts them; find them with Filter rows using is empty on the coordinate column.

Is anything uploaded?

No. Conversion happens in your browser.

Privacy

100% client-side. No upload. See the privacy policy.