CSV to GeoJSON Converter: Turn Spreadsheet Rows into Map-Ready Points
Convert CSV files with latitude and longitude columns into a valid GeoJSON FeatureCollection directly in your browser β geometry validation, delimiter auto-detection, property mapping, and one-click .geojson download with no uploads.
Table of Contents
CSV to GeoJSON Converter: Turn Spreadsheet Rows into Map-Ready Points
Every mapping library speaks GeoJSON, and every business spreadsheet speaks CSV β the distance between those two dialects is exactly where most mapping projects stall. The free CSV to GeoJSON Converter closes that gap in seconds: paste a CSV with latitude and longitude columns, and it produces a standards-compliant GeoJSON FeatureCollection you can feed straight into Leaflet, Mapbox, QGIS, D3, or GitHub's built-in map rendering.
That gap matters more than people expect. Asset registers, CRM exports, survey forms, store lists, and open-data portals hand you rows of delimited text, while mapping tools expect GeoJSON. Bridging them usually means a Python script, a half-remembered jq one-liner, or a desktop GIS import wizard β none convenient when you just need thirty store locations on a map before a meeting.
This converter does the whole job in your browser: no upload step, no account, no server round-trip. Parsing, validation, and download all happen on your machine, which makes it safe for confidential data too β customer addresses, unpublished site plans, and internal sensor locations never leave your laptop.
Why Use the CSV to GeoJSON Converter?
- Zero-friction workflow. Paste your CSV or drop in a file and the output updates live β no installs, no sign-ups, no command line.
- Standards-correct output. The tool emits an RFC 7946-style FeatureCollection of Point features and writes coordinates in the correct [longitude, latitude] order automatically β the single most common mistake in hand-rolled conversions.
- Geometry validation built in. Rows with missing or non-numeric coordinates are flagged and skipped with a count, so one bad row does not poison an entire map layer.
- Delimiter auto-detection. Commas, semicolons, tabs, and pipes are detected from a sample of your data, and the RFC-4180-style parser handles quoted fields, including fields with embedded commas or line breaks.
- Property mapping for free. Every column other than latitude and longitude rides along as a feature property, so popups and tooltips in Leaflet or Mapbox work without extra glue code.
- Privacy by design. Conversion is 100% client-side. Your spreadsheet is never transmitted, logged, or stored anywhere.
Key Features
| Feature | What it does | Why it matters |
|---|---|---|
| CSV to FeatureCollection | Each row becomes one Point feature inside a single GeoJSON object | The exact shape Leaflet, Mapbox, and QGIS expect |
| Delimiter auto-detect | Samples your input and picks comma, semicolon, tab, or pipe | European semicolon CSVs and TSV exports just work |
| RFC-4180 quoted fields | Quoted fields keep embedded delimiters and newlines intact | Values like Chiang Mai, Old City stay one field |
| Geometry validation | Checks that latitude and longitude parse as finite numbers; skips and counts bad rows | You learn about dirty data before it hits the map |
| Property mapping | All remaining columns become feature properties | Rich popups without writing code |
| Header handling | Uses your header row as property names, or falls back to column_1, column_2 | Works with exports from any system |
| One-click output | Copy to clipboard or download a .geojson file | Drop it straight into a repo or mapping project |
A few details worth calling out. Latitude and longitude column names are configurable, so headers like latitude, y, or lon are fine β just tell the tool which is which. A pretty-print toggle switches between a compact single-line JSON blob for production and an indented layout for reading. And because the output is plain GeoJSON, it renders instantly when committed to GitHub or pasted into geojson.io.
How to Use
- Open the tool and add your data. Go to the CSV to GeoJSON Converter and paste your CSV into the input area, or type a few rows to test.
- Confirm the delimiter. Auto-detect is on by default and handles commas, semicolons, tabs, and pipes; pick manually if your file is unusual.
- Name your coordinate columns. Enter which header holds latitude and which holds longitude. The defaults are lat and lng, but latitude and longitude work equally well.
- Review validation and options. Check that the row count matches expectations and the invalid-row count is zero. Toggle property inclusion and pretty-print to taste.
- Copy or download. Grab the JSON from the output panel, or download a .geojson file ready for Leaflet, Mapbox, QGIS, or GitHub.
GeoJSON Anatomy for Spreadsheet People
If you have only ever worked with spreadsheets, GeoJSON is easier than it looks. It is just JSON with a fixed shape:
- A FeatureCollection is the outer container β think of it as the whole sheet.
- Its features array holds one entry per row.
- Each Feature has a geometry and a properties object.
The geometry for spreadsheet data is a Point, and its coordinates value trips everyone up: longitude comes first, then latitude β [lng, lat]. That ordering follows the GIS convention of X before Y. Spreadsheets usually list latitude first because people say "lat and long" out loud, which is precisely why hand-built converters ship maps full of points in the wrong ocean. Bangkok, at 13.7563 N and 100.5018 E, must become [100.5018, 13.7563].
Validation. The converter checks that both coordinate cells parse as finite numbers; anything else β empty cells, text like N/A, locale-formatted values such as 13,7563 β lands in the skipped-and-counted bucket instead of producing a silently broken point. Geographically, a valid latitude sits between β90 and 90 and a valid longitude between β180 and 180. The classic swapped-coordinates symptom is easy to spot: every pin lands in the ocean south of West Africa, or the map will not fit because one axis is out of range.
Delimiter and quoting edge cases. Auto-detection counts candidate delimiters outside quoted regions, so a quoted address containing commas does not fool it. The parser also honors doubled quotes inside quoted fields and keeps a line break inside a quoted field from splitting one logical row into two.
A worked example. Take this three-row CSV:
name,lat,lng,population Bangkok,13.7563,100.5018,10539000 Chiang Mai,18.7883,98.9853,1205000 Phuket,7.8906,98.3924,415000
The converter emits (shown here abbreviated):
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [100.5018, 13.7563]
},
"properties": {
"name": "Bangkok",
"population": "10539000"
}
}
]
}
Note what happened: lat and lng were consumed to build the geometry in the right order, while name and population became properties any popup template can display.
Practical Use Cases
Store locator feeds
Marketing hands you stores_final_v3.csv every Monday. Convert it once, commit the .geojson next to your frontend, and your Leaflet store map reads the file directly β no backend, no database, no import pipeline to babysit.
Sensor and network site maps
Fleet trackers, weather stations, and cell-site registers all live in spreadsheets with lat and lng columns. Converting them to GeoJSON lets you overlay every site on an operations dashboard and attach status or model as properties for hover details.
City open-data imports into Mapbox or Leaflet
Most municipal open-data portals publish trees, cameras, public toilets, and public art as CSV downloads. Convert the file once and load it as a GeoJSON source in Mapbox GL JS or an L.geoJSON layer in Leaflet, with each attribute available for styling and filtering.
Field survey data
Researchers and inspectors collect GPS points in the field, often in DMS notation first. Clean them into decimal degrees, convert to GeoJSON, and the whole survey becomes a single portable file that QGIS, R, or Python can consume without bespoke parsing.
Best Practices
- Longitude first, always. GeoJSON coordinates are ordered [lng, lat]. The converter handles this for you; never "fix" it by hand.
- Validate ranges before mapping. Latitudes must fall between β90 and 90, longitudes between β180 and 180. Out-of-range values mean unconverted degrees-minutes-seconds or swapped columns.
- Keep useful properties, drop sensitive ones. Category, status, and capacity make popups valuable; customer names and phone numbers usually do not belong in a file you are about to commit.
- Mind the coordinate system. The converter assumes WGS84, the same system GPS and Google Maps use. Data in projected units such as UTM meters needs reprojecting first.
- One row, one point. De-duplicate your spreadsheet before converting so repeated rows do not stack pins on the same location.
- Preserve decimal precision. Six decimal places is roughly 10 centimeters; rounding to two can move a point hundreds of meters.
Ready to Map Your Data?
Open the CSV to GeoJSON Converter, paste your spreadsheet, and download a map-ready .geojson file before your coffee cools. Your data stays on your machine the entire time.
Related Tools You Might Like:
- GPS Coordinate Converter β turn DMS notation like 13Β°45'22" into decimal degrees before converting.
- CSV to JSON Converter β general-purpose CSV parsing when you need plain JSON instead of GeoJSON.
- Unit Converter β handle distance and area units that surround your coordinate data.
Happy mapping!
Frequently Asked Questions
Q: Does my CSV file get uploaded anywhere?
A: No. Parsing, validation, and download all run locally in your browser using JavaScript. Nothing is transmitted to a server, which makes the tool safe for confidential location data.
Q: My CSV uses semicolons because it was exported on a European locale. Do I need to change anything?
A: No. Delimiter auto-detection samples your input and picks between comma, semicolon, tab, and pipe. You can also override it manually if your file is ambiguous.
Q: Why are all my points showing up in the ocean near Africa?
A: That is the classic swapped-coordinates symptom. GeoJSON expects [longitude, latitude], while most spreadsheets list latitude first. Check that you assigned the latitude and longitude columns correctly and that the source values are not swapped themselves.
Q: Can I convert polygons or lines, not just points?
A: This tool specializes in lat/lng point data, which covers the vast majority of spreadsheet exports. For polygons and lines you need a source that already contains geometry shapes; a CSV of coordinates cannot express them unambiguously.
Q: Will the output work in GitHub, geojson.io, QGIS, and Mapbox?
A: Yes. The converter produces a standard FeatureCollection of Point features in RFC 7946 style, which every mainstream mapping platform renders natively β including GitHub, which displays committed GeoJSON files as an interactive map.