GeoJSON Bounding Box Calculator

Calculate the bounding box envelope of any GeoJSON geometry. Get min/max coordinates instantly.

Skip to the tool

A bounding box is the four-number summary of where your data lives: [west, south, east, north]. It's what you hand to map.fitBounds() on first render, what PostGIS's spatial index uses to prune candidate rows, and the first thing to check when a map opens centred on the Atlantic Ocean — that's almost always a swapped lat/lng creating a bbox that straddles 0,0.

Paste your GeoJSON on the left and the calculator walks every coordinate, returning the envelope as a copy-ready array, individual min/max values, and a dashed rectangle drawn on the map. The visible rectangle is the diagnostic — if it looks too wide, you have an outlier; if it looks rotated, you've mixed coordinate orders somewhere.

The body below covers the RFC 7946 bbox member, the 3D six-value form for elevation data, the Turf.js and Shapely equivalents, and the common consumers (tile requests, Leaflet viewport, PostGIS ST_MakeEnvelope). For more on coordinate systems, see the coordinate reference systems guide.

Watch out for: the antimeridian. A bounding box for the Aleutian Islands or Fiji that crosses the 180°/-180° line will, naively computed, span almost the whole globe (min_lng = -179, max_lng = 179). RFC 7946 §5.2 specifies that bbox values should "wrap" — i.e. the west value can be larger than the east value when the box crosses the antimeridian. This tool emits a wrapped bbox and warns when input data crosses the line so downstream consumers don't accidentally fit a map to the whole planet.

What Is a Bounding Box?

A bounding box (bbox) is the smallest axis-aligned rectangle that completely encloses a set of geometries. It is defined by four values: the minimum longitude (west), minimum latitude (south), maximum longitude (east), and maximum latitude (north). In GeoJSON, bounding boxes are represented as an array: [west, south, east, north].

The RFC 7946 specification allows an optional bbox member on any GeoJSON object. Including it helps applications quickly determine the spatial extent of the data without parsing every coordinate. Many mapping libraries use the bbox to set the initial map viewport.

How to Use the Bounding Box Calculator

Paste your GeoJSON into the input panel and the tool will calculate the bounding box across all geometries in the data. The result includes the four corner values plus a ready-to-use array format you can copy directly into your code.

The bounding box is also displayed visually as a dashed rectangle on the map so you can verify it matches the expected extent. This is particularly useful for catching data issues — if the bounding box is unexpectedly large, you may have an outlier point or a swapped coordinate pulling the extent to an unintended area.

Bounding Box Format

The output follows the standard GeoJSON bbox format as defined in RFC 7946 Section 5:

JSON{
  "type": "FeatureCollection",
  "bbox": [-73.99, 40.70, -73.95, 40.80],
  "features": [...]
}

The four values are always in the order [minLng, minLat, maxLng, maxLat]. For 3D coordinates, the bbox extends to six values: [minLng, minLat, minAlt, maxLng, maxLat, maxAlt]. This tool currently outputs the 2D four-value format.

Common Uses for Bounding Boxes

  • Setting the initial map viewport to fit all features with map.fitBounds()
  • Filtering spatial queries in PostGIS using ST_MakeEnvelope
  • Requesting map tiles for a specific region from tile servers
  • Validating that data falls within an expected geographic area
  • Adding bbox to GeoJSON responses for API consumers
  • Clipping data to a region using the clip tool

Programmatic Equivalent

In JavaScript with Turf.js:

JavaScriptconst bbox = turf.bbox(featureCollection);
// [minLng, minLat, maxLng, maxLat]

// Use with Leaflet:
map.fitBounds([[bbox[1], bbox[0]], [bbox[3], bbox[2]]]);

In Python with Shapely:

Pythonfrom shapely.geometry import shape, box
polygon = shape(geojson_geometry)
minx, miny, maxx, maxy = polygon.bounds
bbox_polygon = box(minx, miny, maxx, maxy)

Related tools: centroid calculator for finding the center point, area calculator for measuring polygon area.