More games at WuGames.ioSponsoredDiscover free browser games — play instantly, no download, no sign-up.Play

CSV to GeoJSON Converter

Free online CSV to GeoJSON converter (RFC 7946, WGS84/EPSG:4326). Map lat/lon columns, trim coordinate precision, preview on Leaflet. Private, browser-side.

Upload
Drag and drop CSV file here
or click to browse

What is CSV to GeoJSON Converter?

The CSV to GeoJSON Converter is a free online tool that transforms CSV files containing latitude and longitude coordinates into GeoJSON format. This is essential for converting spreadsheet data, GPS logs, or database exports into map-ready GeoJSON files.

GeoJSON is the standard format for web mapping libraries like Leaflet, Mapbox, Google Maps, and OpenLayers. By converting your CSV coordinate data to GeoJSON, you can easily visualize and analyze geographic information on interactive maps.

The tool automatically detects coordinate columns, preserves all additional data as feature properties, and handles various CSV formats including different delimiters and coordinate orders.

How to Use CSV to GeoJSON Converter

Converting CSV to GeoJSON is simple:

  • Paste your CSV data or upload a CSV file
  • The tool automatically detects latitude and longitude columns
  • Adjust column mapping if needed (lat, lon, latitude, longitude are auto-detected)
  • Click Convert to generate GeoJSON FeatureCollection
  • Preview the result on the map or download the GeoJSON file

All additional CSV columns are automatically included as feature properties in the GeoJSON output, preserving your data attributes.

CSV Format Requirements

Your CSV file should have:

  • Header row with column names
  • Latitude column (named: lat, latitude, y, etc.)
  • Longitude column (named: lon, lng, longitude, x, etc.)
  • Valid decimal coordinates (e.g., 21.0278, 105.8342)
  • Optional: name, description, or other attribute columns

The tool supports various CSV formats, including comma, semicolon, and tab-separated values.

Example CSV Format

Here's an example CSV that can be converted:

name,lat,lon,population,country
Hanoi,21.0278,105.8342,8000000,Vietnam
Ho Chi Minh City,10.8231,106.6297,9000000,Vietnam
Da Nang,16.0544,108.2022,1200000,Vietnam
Bangkok,13.7563,100.5018,10500000,Thailand
Singapore,1.3521,103.8198,5700000,Singapore

This will be converted to a GeoJSON FeatureCollection with 5 Point features, each containing the name, population, and country as properties.

Applications and Use Cases

This converter is useful for:

  • Visualizing spreadsheet location data on web maps
  • Converting GPS logs or tracking data to GeoJSON
  • Preparing location data for Leaflet or Mapbox applications
  • Transforming database exports with coordinates
  • Creating GeoJSON from survey data with GPS coordinates
  • Converting store locations, POI data, or field measurements to map format

Features and Options

Key features of this CSV to GeoJSON converter:

  • Automatic column detection for lat/lon fields
  • Custom column mapping for non-standard headers
  • Preserve all CSV columns as GeoJSON properties
  • Skip invalid coordinates automatically
  • Handle different coordinate orders (lat,lon or lon,lat)
  • Preview results on interactive map
  • Download as .geojson file for use in GIS applications

Frequently Asked Questions

It converts a CSV spreadsheet of geographic data into a valid GeoJSON FeatureCollection of Point features. The CSV must contain a latitude column and a longitude column in decimal degrees; every other column becomes a property on the resulting Feature. Common use cases include geocoded store locators, survey results with coordinates, sensor readings, GPS logs, and points of interest. The output is ready to drop into Leaflet, Mapbox GL, Google Maps, OpenLayers, or any desktop GIS such as QGIS. Everything runs in your browser; nothing is uploaded to any server.

Coordinates must be in WGS84 decimal degrees (EPSG:4326), the only coordinate reference system the GeoJSON specification (RFC 7946) defines. Acceptable values look like 37.7749, 40.7128, -122.4194, and so on. Degrees-minutes-seconds notation (37°46'30"N) must be converted to decimal degrees before importing. The first row must be a header row; the tool auto-detects common latitude names (lat, latitude, y) and longitude names (lon, lng, longitude, x), and you can override the mapping manually with the column pickers.

This is the single most common GeoJSON mistake: swapped latitude and longitude. GeoJSON stores each position as [longitude, latitude], the opposite of the spoken "lat, long" order, so putting latitude first lands points off the coast of West Africa near 0,0 (the Gulf of Guinea) or simply in the wrong hemisphere. This tool always writes correct [lon, lat] output. It also watches for the giveaway sign of swapped source columns — a latitude value greater than ±90 degrees, which is geographically impossible — and, when it sees one, warns you and automatically swaps the lat/lon roles for that conversion so your points land where they should.

RFC 7946 §11.2 explicitly recommends storing no more than 6 decimal places, because 6 decimals is roughly 0.11 m of precision at the equator — already finer than consumer GPS. Raw floating-point exports often carry 12–15 meaningless digits that only bloat the file. Use the Coordinate decimals selector to round the output: 6 dp is the spec-recommended default, 5 dp (~1.1 m) suits most web maps, and trimming long floats can shrink a FeatureCollection by 30–60%, which speeds up Leaflet/Mapbox loads and CDN/tile delivery. Choose Full only when you genuinely need sub-centimetre survey precision.

Yes. The tool emits a standards-compliant FeatureCollection per RFC 7946: each row becomes a Feature with a Point geometry whose coordinates are in [longitude, latitude] order and in WGS84 / EPSG:4326. Remaining columns are attached under the properties object using their original header as the key. You can paste the result into geojson.io, a GeoJSON linter, or load it directly into QGIS, Leaflet, or Mapbox GL to confirm it validates. Out-of-range or non-numeric rows are skipped (or reported) rather than written as broken geometry.

With "Include all columns as properties" enabled, every column except the chosen latitude and longitude becomes a key in the Feature's properties object. The tool preserves identifier-style values such as postal codes, ZIP codes, FIPS codes, and phone numbers exactly as written — a value like 07016 keeps its leading zero instead of being silently turned into the number 7016. Clean numeric fields are still emitted as JSON numbers so you can style or filter by them. If you set a Name column, it is also copied to a name property for convenient map labels and popups.

No. The conversion happens entirely in your browser using JavaScript; no part of the CSV file is uploaded to any server. You can verify this by opening the Network tab of your browser developer tools and watching for outgoing requests during conversion — you will see none. This matters when your CSV contains sensitive data such as customer addresses, patient locations, or proprietary survey results. The only network calls are the optional map preview, which fetches OpenStreetMap basemap tiles; the conversion itself works offline.
CSV to GeoJSON Converter — Free online CSV to GeoJSON converter (RFC 7946, WGS84/EPSG:4326). Map lat/lon columns, trim coordinate precision, previe
CSV to GeoJSON Converter