GeoJSON Validator

Validate your GeoJSON data against the RFC 7946 specification. Find and fix errors in your GeoJSON files.

How GeoJSON Validation Works

This validator checks your GeoJSON against the RFC 7946 specification. It verifies the structural integrity of your data including required fields, coordinate formats, geometry types, and nesting rules. Paste your data and any errors are reported immediately with specific descriptions of what went wrong and where.

Validation runs entirely in your browser — your GeoJSON data is never sent to a server. The validator also counts features by geometry type, giving you a quick overview of what your data contains alongside the validation result.

What Gets Validated

  • Type field — must be a valid GeoJSON type (Feature, FeatureCollection, Point, etc.)
  • Coordinates — must be arrays of numbers in [longitude, latitude] order
  • Polygon rings — must be closed (first and last position identical) with at least four positions
  • Geometry objects — must include a valid type and coordinates member
  • Feature objects — must include geometry and properties members
  • FeatureCollection — must include a features array

The validator checks structural correctness, not geometric validity. It does not check for self-intersecting polygons, clockwise/counterclockwise winding order, or whether coordinates fall within valid ranges (-180 to 180 for longitude, -90 to 90 for latitude). For winding order issues, use the rewind tool.

Common GeoJSON Errors

The most frequent mistakes developers encounter with GeoJSON include:

  • Swapped coordinates — GeoJSON uses [lng, lat], not [lat, lng]. This is the single most common error, causing points to appear in the ocean or on the wrong continent. Use the coordinate flip tool to fix this.
  • Unclosed polygon rings — the last coordinate must exactly match the first coordinate. A ring with 4 unique vertices needs 5 positions.
  • Missing properties — Feature objects must include a properties member, even if it is null or an empty object.
  • Bare geometries — using a raw Geometry object where a Feature or FeatureCollection is expected by the consuming library.
  • Invalid JSON syntax — trailing commas, unquoted keys, or single quotes instead of double quotes:
JSON (invalid — trailing comma){
  "type": "Feature",
  "properties": { "name": "Test" },
  "geometry": {
    "type": "Point",
    "coordinates": [40.7484, -73.9857],  ← trailing comma
  }
}

Validation in Your Workflow

Validate GeoJSON at system boundaries: when receiving data from external APIs, after format conversions, and before importing into databases. Catching errors early prevents silent failures downstream — a PostGIS import with invalid geometry may succeed but produce wrong query results later.

For programmatic validation, most languages have GeoJSON validation libraries. In JavaScript, geojson-validation and Turf.js provide structural checks. In Python, geojson and shapely can validate both structure and geometry. See the debugging guide for a systematic approach to fixing common GeoJSON problems.

After Validation

Once your GeoJSON passes validation, you can view it on a map, pretty-print it for readability, or minify it for production use. If your polygon winding order is wrong, the rewind tool can fix it automatically. For a full list of available tools, return to the homepage.