Skip to content

GeoJSON bounds

Calculate the local numeric WGS84 envelope and center of bounded GeoJSON coordinates.

Numeric WGS84 envelope-74.006°, 40.7128° → -0.1278°, 51.5074°
W -74.006°E -0.1278°S 40.7128°N 51.5074°
Center46.1101, -37.0669
Positions2
Coordinates use longitude first, then latitude.
Processed on your device

How it works & useful details

How it works & limits

Calculates the smallest numeric west, south, east and north values found in valid GeoJSON coordinate positions. The center is the arithmetic center of that envelope.

The envelope does not choose the short route across the antimeridian. It has the same local structural and size limits as the GeoJSON validator.

Private local calculation

Coordinates and pasted data stay in this browser tab. These tools use no map tiles, geocoding, routing, elevation data or network requests.

About this tool

GeoJSON bounds calculates the numeric WGS84 envelope and center of the coordinates in a GeoJSON document. It is useful for fitting a map view, validating data coverage, or deriving a bounding box for a service.

Coordinates are scanned locally and the resulting bbox and center are reported as plain numbers. The tool does not render a map or download tiles.

How to use it

  1. Paste the GeoJSON document.
  2. Run the calculation to scan its coordinates.
  3. Read the west, south, east, and north bounds and the center point.
  4. Copy the values into your map or data configuration.

Worked example

For a LineString from London [−0.1278, 51.5074] to New York [−74.006, 40.7128], the bounds are west −74.006, south 40.7128, east −0.1278, north 51.5074. That box is 73.88° wide and 10.79° high, and its centre is 46.1101, −37.0669.

Many mapping libraries take this as a bbox array in the order [west, south, east, north], which is also the order GeoJSON uses for its optional "bbox" member.

Limits of a numeric envelope

The envelope is simply the minimum and maximum longitude and latitude found in the data. For data that crosses the antimeridian (180° longitude), such as a route from Japan to Alaska or a dataset covering Fiji, the numeric box spans almost the entire globe instead of the short way across. Split such geometries, or handle the wrap in your map code.

The centre is the middle of the box, not the centroid of the geometry. For an L-shaped region or a curved line, it can fall outside the shape itself. It is a good point to centre a map view on, not a representative location for labels.

Frequently asked questions

Which geometry types are supported?

Point, LineString, Polygon, MultiPoint, MultiLineString, and MultiPolygon coordinates are scanned; GeometryCollection support depends on the bounded reader.

Does a bounding box handle the antimeridian?

The envelope is numeric, so data crossing the antimeridian can produce a wide box; split such data before calculating bounds.

What is the limit?

Up to 500,000 characters of GeoJSON text.