Grid Generator

Draw a bounding box on the map or type coordinates, then generate square, hexagon, triangle or point grids and download them as GeoJSON, KML or CSV.

🔲Click on the map to set the first corner of the grid area.

About This Tool

The Grid Generator creates a regular spatial grid — square, hexagonal, triangular, or a lattice of points — over a bounding box you define by clicking the map or entering coordinates. Spatial grids are used in environmental monitoring (dividing a study area into sampling units), urban planning (zoning analysis), epidemiology (aggregating case data into uniform cells), systematic field sampling, and any spatial analysis that requires a tessellated reference framework.

Input

A bounding box (two diagonal corner clicks, or manual north/south/east/west bounds), a grid type (square, hexagon, triangle or points), a cell size, and a unit (kilometres, miles, metres, feet or nautical miles). Optionally clip edge cells to the box. Click Generate Grid to build the grid from the current settings.

Output

The grid rendered on the map and downloadable as GeoJSON (FeatureCollection, one feature per cell, each carrying an id property), KML (one <Placemark> per cell), or a CSV of cell-centre coordinates. Square grids additionally tag each cell with row, col and an A1-style label. The summary bar shows cell count, cell size, cell area and total area.

Key Concepts

Square grid
Axis-aligned rectangular cells of equal width and height in the chosen unit, computed geodesically on the WGS84 ellipsoid using Turf.js squareGrid. On a Mercator map, cells appear to narrow at higher latitudes because the projection stretches longitude — but each cell keeps the same angular size, so real-world ground width shrinks slightly toward the poles.
Hexagonal grid (flat-top)
Tessellating regular hexagons with the specified circumradius (centre-to-vertex distance). Each cell has exactly six equidistant neighbours, which reduces the directional bias inherent in square grids — a key advantage for network analysis, disease spread modelling, and any application where isotropy matters. Generated using Turf.js hexGrid.
Triangle grid
Tessellating triangles produced by splitting a square grid along its diagonals, via Turf.js triangleGrid. Useful where a finer or alternating tessellation is required.
Point grid
A regularly spaced lattice of points marking cell centres, via Turf.js pointGrid. Commonly used to generate systematic sampling locations rather than filled cells.
Bounding box
The minimum axis-aligned rectangle enclosing the two corners, expressed internally as [min_lng, min_lat, max_lng, max_lat]. By default cells are fitted within the bounding box, so a small margin may remain along the edges; only the triangular grid can extend slightly beyond the boundary, and Clip cells to box trims those.

Frequently asked questions

What is a spatial grid?

A spatial grid divides an area into regular, equal-sized cells — squares, hexagons or triangles — used as a reference framework for sampling, data aggregation and spatial analysis.

Should I use a square, hexagon, triangle or point grid?

Squares are the simplest and align neatly to coordinates. Hexagons give every cell six equidistant neighbours, reducing directional bias in movement, network and spread models. Triangles suit finer or alternating tessellations, and point grids output cell centres as systematic sampling locations.

What cell sizes and units are supported?

Enter any cell size in kilometres, miles, metres, feet or nautical miles. The tool estimates the cell count before generating so you can avoid oversized grids.

How do I import the grid into QGIS, ArcGIS or Google Earth?

Download GeoJSON or KML and open it directly — GeoJSON loads in QGIS and ArcGIS Pro, and KML opens in Google Earth. The CSV export lists each cell centre for spreadsheets and scripts.

Are the cells clipped to my bounding box?

By default, edge cells extend slightly beyond the box so every cell stays a full shape. Enable Clip cells to box to trim edge cells exactly to the boundary.

Does each cell have an identifier?

Yes. Every cell carries a sequential id in its GeoJSON properties, and square grids also include row, col and an A1-style label so you can reference individual cells.

Is there a limit on grid size?

To keep your browser responsive, the tool warns above roughly 5,000 cells and blocks grids above roughly 20,000. Increase the cell size or reduce the area to stay within range.