← All Tools

Hex Grid Coordinate Explorer

Interactively explore hexagonal grids — convert between axial (q,r), cube (x,y,z) where x+y+z=0, and offset row/column coordinates. Click any two hexes to see distance, the line between them, and a ring of a given radius. Works for both pointy-top and flat-top orientations.

A (selected) B (target) Line A→B Ring at radius from A Click a hex to set A · Shift-click for B

Selection

A axial
A cube
A offset
B axial
B cube
B offset
Distance
Line length
Ring size

Corner Pixel Coordinates (radius = 30 px)

About hex coordinates

A hex grid gets weird if you index it by [col][row] — distance is not |Δcol| + |Δrow|, and half the neighbours end up in fractional rows. The trick is to work in cube coordinates (x,y,z) constrained by x + y + z = 0, so each hex sits on the plane cutting through the origin of a 3D cubic lattice. Distance is then simply (|Δx| + |Δy| + |Δz|) / 2. Axial coordinates (q,r) drop the redundant z and are what you store; offset coordinates (odd-r, even-r, odd-q, even-q) are what you show in a rectangular map file. This tool converts between all three — see Amit Patel's Red Blob Games Hexagonal Grids guide for the full derivation.