Lat/Long to GeoJSON Converter

Convert latitude and longitude coordinates to GeoJSON Point features.

Skip to the tool

The most common GeoJSON starting point isn't another GeoJSON file — it's a spreadsheet of addresses, store locations, or sensor readings with two columns of coordinates. The first step in any "show this data on a map" project is turning those rows into a FeatureCollection of Points, and getting the coordinate order right.

Paste rows in CSV, TSV, or whitespace-separated form on the left. The converter detects the column layout, asks you which column is latitude and which is longitude (the most common bug source), and emits a FeatureCollection with one Point Feature per row. Extra columns are preserved as properties on each Feature.

Below the converter the body covers the lat-first vs. lng-first trap (GeoJSON requires [lng, lat], every other format you'll see uses lat, lng), DMS-to-decimal conversion, and the typed-array tricks for handling 100k+ row imports without blocking the main thread. Use the store locator tutorial for the full project flow.

Watch out for: Excel-exported CSVs that wrap negative coordinates in quotes, use a comma as the decimal separator (German/French locales), or insert a Byte Order Mark on the first line. The first row of "-73,9654";"40,7829" instead of -73.9654,40.7829 will fail silently and emit zero features. The converter flags rows it couldn't parse rather than dropping them quietly, but the safest defence is to open the CSV in a text editor and check the first few rows before pasting.

How to Convert Coordinates to GeoJSON

Paste latitude and longitude coordinate pairs (one per line) and this tool creates a GeoJSON FeatureCollection with a Point feature for each pair. Coordinates can be separated by commas, spaces, or tabs.

Enter coordinates in latitude, longitude order (the natural way humans read coordinates). The tool automatically converts them to GeoJSON's required [longitude, latitude] format.

Supported Input Formats

  • 40.7484, -73.9857 — comma-separated
  • 40.7484 -73.9857 — space-separated
  • 40.7484\t-73.9857 — tab-separated (paste from spreadsheets)

Each line should contain exactly one coordinate pair. Blank lines are ignored. The tool processes any number of coordinate pairs.

Common Use Cases

  • Converting spreadsheet columns of coordinates into map-ready GeoJSON
  • Creating GeoJSON from geocoding API results
  • Importing GPS coordinate lists from text files or logs
  • Building marker datasets from address lookup results

To extract coordinates back out of GeoJSON, use the GeoJSON to lat/long extractor.

Try It

Paste these three coordinate lines representing landmarks in San Francisco. Each line is a latitude/longitude pair:

CSV37.8199, -122.4783
37.7749, -122.4194
37.8024, -122.4058

The converter produces a FeatureCollection with three Point features:

GeoJSON{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-122.4783, 37.8199]
      }
    },
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-122.4194, 37.7749]
      }
    },
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-122.4058, 37.8024]
      }
    }
  ]
}

Notice that the input uses latitude-first order (37.8199, -122.4783) but the GeoJSON output uses longitude-first order ([-122.4783, 37.8199]) as required by the RFC 7946 specification.

How the Parsing Works

The parser splits the input text on newlines and processes each non-empty line as a coordinate pair. It detects the delimiter (comma, space, or tab) and extracts two numeric values. The first value is treated as latitude and the second as longitude. Each pair is wrapped in a GeoJSON Point Feature with an empty properties object, and all features are collected into a FeatureCollection.

After conversion, you can view the points on a map to verify their positions, or use the JSON.stringify(result, null, 2) to format the output for documentation.