MapTools
developer toolsDeveloperFree · No signup

GeoJSON Validator & Repair — Check and Fix GeoJSON Online

Paste or drop a GeoJSON file to validate it against RFC 7946. Get pinpointed errors, one-click fixes for unclosed rings and winding order, and a clean download.

GeoJSON Input

Paste, drop a file, or try a sample

Drop a .geojson / .json file here

or click to browse — files stay in your browser

Validation Result

Paste GeoJSON or load a sample to validate against RFC 7946.

Checked against RFC 7946: required "type" members, valid geometry types, finite numeric positions, minimum ring and line lengths, closed linear rings, and the right-hand rule (counterclockwise exterior rings, clockwise holes). Warnings flag out-of-range coordinates and winding order. Everything runs locally in your browser — your data is never uploaded.

Runs entirely in your browser — your inputs never leave this page.

How this tool works

  1. 1

    Your GeoJSON is parsed and checked rule by rule against RFC 7946: valid types, coordinate structure, linear-ring closure, right-hand winding order, and bounding-box sanity.

Common uses

  • Debugging GeoJSON that will not render on a map
  • Cleaning data before importing to PostGIS or QGIS
  • Validating API output in a data pipeline

Frequently asked questions

It checks JSON validity, geometry types, coordinate structure, linear-ring closure (first point must equal last), winding order, and bbox ranges — everything RFC 7946 requires.

More in Developer Tools

View all →
Worked example

Fixing a Broken Bike-Lane File for a Map Project in Portland, Oregon

Priya, a junior developer in Portland, Oregon, downloads a GeoJSON file of proposed bike lanes from the city's open data portal. When she loads it into her mapping library, the map stays empty and the console shows an error she cannot pin down. The file is thousands of lines long, so hunting for the flaw by eye could eat the whole afternoon. Rather than guess, she drops the file into the GeoJSON validator and lets it read the file against the RFC 7946 rules, line by line.

The first error it flags is an unclosed polygon ring. One of her polygons lists four positions: [-122.68, 45.52], [-122.68, 45.53], [-122.67, 45.53], and [-122.67, 45.52]. A valid linear ring needs at least four positions and must end exactly where it started, repeating the first coordinate as the last — so this ring needs a fifth position, [-122.68, 45.52] again, to close. Some tools draw unclosed rings anyway, which is why the file looked fine in one program and broke in another. The validator's one-click fix appends the missing point.

The second problem is subtler: winding order. Under the right-hand rule in RFC 7946, an outer ring should run counterclockwise when the coordinates are plotted with longitude east and latitude north. Priya's ring runs clockwise, the order her export tool happened to produce, and strict parsers can read that as a hole — or as a polygon covering the entire planet except her little block. To picture the block itself: it spans 0.01 degrees of latitude, about 1.11 kilometers, by 0.01 degrees of longitude, about 0.78 kilometers at Portland's latitude. The validator flips the ring to the correct order and re-checks the whole file to confirm nothing else is hiding.

With both repairs applied, Priya downloads the cleaned file, loads it into her project, and the bike lanes appear exactly where they should, following the downtown streets she expected. Before she calls it done, she runs the repaired file through the validator one last time — a habit worth having, because fixing one geometry can expose a second one that was hiding behind the first error, and a clean report on the finished file is the real finish line. She commits the validated version to the project repository and notes the two fixes in her team chat, because the city's export tool will produce the same flaws in next month's update too. Ten minutes in the validator saved an afternoon of staring at a blank map and a console error — and the next export now takes her two minutes to clean.

Common mistakes to avoid

  • Swapping latitude and longitude. GeoJSON coordinates are always longitude first, then latitude. Swap them and strict tools reject the values as impossible, while lenient ones happily draw your data in the ocean on the wrong side of the planet. It is the first thing to check when features land somewhere absurd.
  • Leaving polygon rings unclosed. Every ring must start and end with the identical position, and a ring needs at least four positions in total. An unclosed ring is the single most common reason a polygon file fails to load, especially in files exported from spreadsheets and drawing tools.
  • Saving 'JSON' with trailing commas or comments. GeoJSON must be strict JSON. The trailing comma or explanatory comment that a JavaScript file forgives will make a strict GeoJSON parser reject the whole file, often with an error message that points at the wrong line.

Pro tips

  • Validate every file before uploading it to a mapping platform — it is far faster than debugging a blank map.
  • Keep an untouched copy of the original file before applying one-click repairs, so you can compare or start over.
  • After a repair, spot-check two or three coordinates on a real map to confirm features sit where they belong.
Geospatial Engineering Reference & Field Manual

Applied Geospatial: Aviation, Marine, Time & Map APIs

Where mapping meets the real world: how planes navigate the curve of the Earth, how ships measure the sea, how time zones really work, and how developers build on map tiles and APIs. Written for GeoJSON Validator & Repair — Check and Fix GeoJSON Online and the everyday mapping tasks around it.

1

Great-Circle Navigation: Why Planes Arc

The shortest path between two points on a sphere is a great circle — the route you get slicing the planet through its center. On a flat map this looks like a dramatic arc, which is why New York to Tokyo flights swing near Alaska. The map is lying; the plane is flying straight.

Airlines do not fly perfect great circles. Jet streams — rivers of wind at 35,000 feet — can add 100 mph to ground speed or subtract it. Dispatchers nudge routes into favorable winds, trading a few extra miles for much faster trips. The planned track is a great circle bent by the weather.

For flight planning, distances come in flavors. Great-circle miles are the geometric minimum; filed flight plans run 3 to 7 percent longer for airways and maneuvering. Fuel planning adds reserves on top. When a tool reports 5,500 miles for a transatlantic hop, the airline plans for 5,800.

Airports are identified by two code systems. The 3-letter IATA codes (JFK, LHR, CDG) are for travelers; the 4-letter ICAO codes (KJFK, EGLL, LFPG) are for pilots and air traffic control, with the first letter naming the region. Both point to the same runways.

2

At Sea: Nautical Miles, Knots & Rhumb Lines

A nautical mile is one minute of latitude — about 1.15 land miles or 1.85 kilometers. Because it derives from the Earth's geometry, it is the natural unit for marine navigation: one minute of latitude traveled equals one nautical mile made good, anywhere on the planet.

Speed at sea is measured in knots — nautical miles per hour. The word comes from sailors tossing a knotted rope overboard and counting knots paid out against a sandglass. A container ship at 20 knots covers about 480 nautical miles a day, which is why your overseas order takes weeks.

Sailors historically steered rhumb lines: courses of constant compass bearing. A rhumb line spirals toward the pole and runs longer than the great circle, but it is trivially easy to follow — just hold the heading. Modern ships with GPS follow great circles, but the rhumb line remains the backup every navigator learns.

Ports are the fixed points of maritime geography. Each major harbor publishes exact coordinates for its harbor entrance, and shipping contracts price by port pair. A few miles of error in a port position can misroute a vessel into the wrong traffic lane — precision matters even on the open ocean.

This page shows the first two chapters. Read the complete this category field guide →