Skip to content

GeoJSON Structure Validator

A GeoJSON validator helps when a map file looks like valid JSON but a mapping library still rejects its features. Open your .geojson or .json file, or paste its contents, to check supported geometry structures, longitude and latitude bounds, and closed polygon rings. The results identify structural problems and let you save a diagnostic report. This is a local preflight for map data, rather than a survey of whether the locations or polygon topology are geographically correct.

GeoJSON Structure Validator

Check feature and geometry structure, coordinate bounds and polygon ring closure, with a downloadable diagnostic report.

Maximum file size: 25 MB per file. You can also drag files here.

Supported scope and limitations

Checks basic RFC 7946 structure and WGS84 longitude/latitude bounds. It does not verify polygon self-intersections, winding, geographic accuracy or antimeridian splitting. Null feature geometries are allowed; duplicate IDs are reported.

Examples contain invented demonstration data. Replace it before using any export.

Privacy: files are processed in your browser and are never uploaded.

What the GeoJSON validator checks

GeoJSON adds geographic structure to JSON: a geometry describes coordinates, a Feature pairs that geometry with properties, and a FeatureCollection groups features. A generic JSON parser can accept all three even when a coordinate array has the wrong shape. This checker walks the supported geometry types and examines their positions, so an invalid map file can be diagnosed before you hand it to an importer.

Checks include Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection. A position must contain at least two finite numeric values. Its first number is longitude and its second is latitude; this profile flags longitude outside -180 to 180 or latitude outside -90 to 90. Lines need at least two positions. Polygon rings need at least four positions, with matching first and last positions.

Check a file and read the report

  1. Select Choose file and open a .geojson or .json file. Alternatively, paste the document into the text input.
  2. Select Process files after pasting. Choosing a file starts processing automatically. Use the example control to inspect a small valid feature first.
  3. Read the feature table and diagnostic messages. Coordinate paths help you find the affected member in your original file.
  4. Download geojson-report.json if you need a record of the findings. Correct your source and check the revised version.

The report is a separate JSON document containing errors and a position count; it is not a repaired GeoJSON export. There is no map preview or automatic coordinate reversal. For data originating in Google Earth, convert KML to GeoJSON first, then use this checker to examine the resulting structure.

A point example: longitude comes first

{"type":"Feature","properties":{"name":"Studio"},"geometry":{"type":"Point","coordinates":[-122.4,37.8]}}

This example describes a point with longitude -122.4 and latitude 37.8. Its properties object stores a display name. Reversing those numbers gives latitude -122.4, which falls outside the accepted range and produces a diagnostic. Other reversed pairs may remain inside both ranges, so a clean report cannot prove that every pair is in the correct order.

A ring written as [[0,0],[1,0],[1,1],[0,0]] meets the minimum position and closure checks. Removing the final [0,0] leaves an open ring. Adding that coordinate closes the ring but does not, by itself, establish that the shape has valid winding or avoids crossing itself.

GeoJSON validator example result preview
Illustrative result from this GeoJSON validator using a fictional test file.

Understand errors, warnings and null geometry

Malformed JSON must be corrected before geographic checks can run. Look for trailing commas, single-quoted strings or comments copied from documentation. GeoJSON uses ordinary JSON syntax, so those forms are not accepted. Use actual numbers for coordinates rather than strings such as "37.8".

A Feature can have a null geometry when its location is unknown; the checker accepts that case instead of manufacturing a point at zero. Repeated feature IDs are reported because they can confuse downstream systems. A legacy crs member produces a warning: this GeoJSON validator expects WGS84 longitude/latitude values and does not transform projected easting/northing coordinates into that system.

Boundaries of this structural preflight

The checker does not test polygon self-intersections, winding direction, antimeridian handling, boundary accuracy or a custom property schema. Nested geometries and coordinate counts are bounded for browser safety, including a maximum of 250,000 inspected positions. A very large file may require splitting in a GIS application even when its file size is accepted.

Read RFC 7946 for the full format requirements. If your source is a recorded route with damaged coordinate points, GPX track repair addresses a different file format and should be used before a route conversion. Keep the original data and verify the final result in the map application that will consume it.

Common GeoJSON validator errors and how to fix them

When the GeoJSON validator cannot use a file, it stops with one clear message instead of producing a half-finished download. These are the problems people run into most often, with the fix for each. Most GeoJSON validator errors trace back to how the source file was exported, so correcting the source and running the GeoJSON validator again is usually faster than working around the message.

  • Invalid longitude/latitude position A position is outside ±180 longitude or ±90 latitude, often because latitude and longitude were swapped.
  • Polygon ring is not closed The first and last positions of a ring must be identical.
  • Too few positions A LineString needs two positions and a ring needs four.
  • Expected a valid GeoJSON feature or geometry structure. The JSON is valid but is not a Feature, FeatureCollection or geometry.

Privacy: the GeoJSON validator runs in your browser

GeoJSON validator processing happens with JavaScript in a background worker on this page. Your file is not uploaded to a FileFix server, and the results you download are created in your browser’s memory. Activity and location files reveal where you live, train and travel, so they are worth keeping on your own device. When you finish on a shared computer, clear the selection or close the tab.

Sources

Questions about this tool

Does valid JSON always mean valid GeoJSON?

No. JSON syntax says the text can be parsed. GeoJSON additionally needs appropriate feature members, geometry types and coordinate array shapes.

Does the checker fix invalid coordinates?

No. It reports problems and downloads diagnostics. Edit the source data or re-export it from your GIS software; the tool does not guess locations.

Why is my projected coordinate file rejected?

This profile expects WGS84 longitude and latitude in decimal degrees. Meter-based easting and northing values need a real coordinate transformation before validation.

Are empty locations allowed?

A Feature with a null geometry is allowed. A malformed geometry object or an invalid coordinate array is a different case and can generate an error.

Can this find a polygon that crosses itself?

No. Ring closure and position-count checks are included, but polygon topology, winding and self-intersections are outside this preflight.

Review the supported formats and limitations before using an output file. File processing happens in your browser.