---
id: "gb_os_grid_reference"
kind: "datatype"
status: "draft"
is_pii: false
name: "Ordnance Survey National Grid reference"
regexp: "^[HJNOST][A-HJ-Z] ?(?:\\d{2}|\\d{4}|\\d{6}|\\d{8}|\\d{10}|\\d \\d|\\d{2} \\d{2}|\\d{3} \\d{3}|\\d{4} \\d{4}|\\d{5} \\d{5})$"
categories: ["geo"]
country: ["GB"]
langs: ["en"]
quality: 85
url: "https://registry.apicrafter.io/datatype/gb_os_grid_reference"
---

# Ordnance Survey National Grid reference (`gb_os_grid_reference`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Location on the Ordnance Survey National Grid of Great Britain written with the two letters of a 100 km square (SD, TQ) and an even number of digits, half eastings and half northings: 4 digits give a 1 km square, 10 digits a 1 m point. The digits are often split by spaces (SD 97624 17311). The Irish Grid of Northern Ireland uses one letter instead.

- Personal data (PII): no
- Categories: Geographic identifiers (geo)
- Countries: United Kingdom (GB)
- Languages: English (en)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^[HJNOST][A-HJ-Z] ?(?:\d{2}|\d{4}|\d{6}|\d{8}|\d{10}|\d \d|\d{2} \d{2}|\d{3} \d{3}|\d{4} \d{4}|\d{5} \d{5})$
```

## Examples

- `SD 97624 17311` — Scheduled monument in Calderdale, 10 digits
- `TQ 873 846` — Shellfish sampling point, 6 digits
- `SE1735221689` — Without spaces
- `TL97441340` — 8 digits
- `SD 9762 173` (invalid example) — Odd number of digits
- `XY 123 456` (invalid example) — No such 100 km square
- `TQ` (invalid example) — No digits

## Metacrafter rules

2 rules: 0 match the field name, 2 match values.

- `gbosgridreferencefieldvalue` (data, `gb/gb_geo.yaml`)
- `gbosgridreferencevalue` (data, `gb/gb_geo.yaml`)

## Supported by tools

- [`metacrafter`](https://registry.apicrafter.io/tool/metacrafter.md)

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Ordnance_Survey_National_Grid>

## Quality

Score 85/100. Missing: mapping (Wikidata, Schema.org, ...), translation.

JSON: <https://registry.apicrafter.io/api/v1/datatypes/gb_os_grid_reference.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/GB/geo/gb_os_grid_reference.yaml>
