What Is Winding Order?
Winding order refers to the direction in which polygon vertices are listed — either clockwise or counterclockwise. The RFC 7946 specification requires that exterior polygon rings follow the right-hand rule: vertices must be listed counterclockwise. Interior rings (holes) must be clockwise.
Incorrect winding order can cause rendering problems in some mapping libraries, where a polygon might appear to cover the entire globe except for the intended area.
How the Rewind Tool Works
This tool checks the winding order of every polygon ring in your GeoJSON and reverses any ring that does not conform to RFC 7946. Exterior rings are rewound to counterclockwise, and interior rings (holes) are rewound to clockwise. All other data (properties, coordinates, non-polygon features) is preserved.
When to Use Rewind
- Fixing polygons exported from software that uses clockwise winding (like older Shapefiles)
- Resolving rendering bugs where polygons appear inverted on a map
- Preparing GeoJSON for strict-mode validators or APIs that enforce RFC 7946
- Correcting data from tools that do not follow the right-hand rule convention
After rewinding, validate your data to confirm it is fully compliant with the specification.
Try It
Paste this polygon whose exterior ring is wound clockwise (incorrect per RFC 7946). The tool will reverse the vertex order to counterclockwise:
GeoJSON{
"type": "Feature",
"properties": { "name": "Washington Square Park" },
"geometry": {
"type": "Polygon",
"coordinates": [[
[-73.9973, 40.7308],
[-73.9973, 40.7295],
[-73.9950, 40.7295],
[-73.9950, 40.7308],
[-73.9973, 40.7308]
]]
}
}After rewinding, the coordinate order is reversed so the exterior ring runs counterclockwise. The shape on the map stays identical, but the vertex sequence now satisfies the right-hand rule:
GeoJSON"coordinates": [[
[-73.9973, 40.7308],
[-73.9950, 40.7308],
[-73.9950, 40.7295],
[-73.9973, 40.7295],
[-73.9973, 40.7308]
]]The Right-Hand Rule Explained
The right-hand rule is a convention from the RFC 7946 specification that determines how polygon interiors are identified. If you curl the fingers of your right hand in the direction the vertices are listed, your thumb points upward for exterior rings (counterclockwise) and downward for interior rings (clockwise). This convention lets parsers distinguish between the outside boundary and holes without additional metadata.
Many older GIS tools (including legacy Shapefile workflows) use the opposite convention. When importing data from these sources, polygons may render as their geographic complement — covering the entire world except the intended area. The rewind tool fixes this by detecting the winding direction using the shoelace formula (signed area) and reversing rings that do not conform.
For a deeper dive into GeoJSON structure and rules, see the GeoJSON Specification Guide.