Skip to main content

UTM and MGRS Coordinate Converter API

REAL DATA

Convert WGS 84 latitude and longitude to UTM, UPS and MGRS and back, with grid zone, band letter, convergence, scale factor and the Norway/Svalbard exceptions.

Authoritative reference data or standards computation

Base URL
/api/utm-mgrs
Capabilities
4 routes
Last updated
July 30, 2026
Data sources · 4
+1 more

GET /api/utm-mgrs/from-latlng

Returns the numeric grid coordinate and the MGRS reference together, with the grid convergence, the point scale factor and the EPSG code of the CRS. There is no mode to choose, so there is no mode to get wrong.

Live requestRuns against the public API
No key required
GET/api/utm-mgrs/from-latlng?lat=55.6761&lng=12.5683

Request parameters

Latitude in WGS 84 decimal degrees. From 80°S to 84°N the point projects to UTM; beyond that it projects to UPS with a polar band letter and no zone number. A point exactly on a band boundary belongs to the band north of it, so lat=-80 is band C and lat=84 is band X.

Longitude in WGS 84 decimal degrees; +180 is the same meridian as -180 and falls in zone 1. A point exactly on a zone boundary belongs to the zone east of it, so lng=6 is zone 32.

MGRS digits per axis: 0 names the 100,000-metre square (a five-character reference), 1 is 10 km, 2 is 1 km, 3 is 100 m, 4 is 10 m and 5 is 1 m. Digits are truncated, never rounded (NGA.STND.0037 §3-4c).

Force projection into a specific UTM zone — an extended grid (NGA.STND.0037 §1-9) — instead of the point's natural zone. Only the natural zone or one of its two neighbours in the same band is accepted, wrapping 60 to 1; anything further is a 400 because the distortion grows without bound away from the central meridian. An extended-grid coordinate has no valid MGRS reference, so mgrs comes back null. Rejected for polar points, which have no zone number.

Reference frame of the input and the output. WGS 84 only — the sole accepted value is 'wgs84', case-insensitively. NAD 27, NAD 83, ED 50, OSGB36, Tokyo Datum and the other classical datums are deliberately unsupported, because reading their numbers as WGS 84 moves the point by tens to hundreds of metres (FGDC-STD-011-2001 Annex A gives the same physical point as 18SUJ23480647 on NAD 83/WGS 84 and 18SUJ23450626 on NAD 27) and because those datums use the legacy grid-square lettering of NGA.STND.0037 Appendix C. Any other value is a 400 rather than a plausible-looking wrong answer.

Advanced response options4 options

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/utm-mgrs/from-latlng?lat=55.6761&lng=12.5683"
const res = await fetch("https://randomapi.dev/api/utm-mgrs/from-latlng?lat=55.6761&lng=12.5683");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/utm-mgrs/from-latlng?lat=55.6761&lng=12.5683").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/utm-mgrs/from-latlng?lat=55.6761&lng=12.5683"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 5
lat float required

Latitude in WGS 84 decimal degrees. From 80°S to 84°N the point projects to UTM; beyond that it projects to UPS with a polar band letter and no zone number. A point exactly on a band boundary belongs to the band north of it, so lat=-80 is band C and lat=84 is band X.

allowed: -90 – 90
example: lat=55.6761
lng float required

Longitude in WGS 84 decimal degrees; +180 is the same meridian as -180 and falls in zone 1. A point exactly on a zone boundary belongs to the zone east of it, so lng=6 is zone 32.

allowed: -180 – 180
example: lng=12.5683
precision int

MGRS digits per axis: 0 names the 100,000-metre square (a five-character reference), 1 is 10 km, 2 is 1 km, 3 is 100 m, 4 is 10 m and 5 is 1 m. Digits are truncated, never rounded (NGA.STND.0037 §3-4c).

default: 5
allowed: 0 – 5
example: precision=3
zone int

Force projection into a specific UTM zone — an extended grid (NGA.STND.0037 §1-9) — instead of the point's natural zone. Only the natural zone or one of its two neighbours in the same band is accepted, wrapping 60 to 1; anything further is a 400 because the distortion grows without bound away from the central meridian. An extended-grid coordinate has no valid MGRS reference, so mgrs comes back null. Rejected for polar points, which have no zone number.

allowed: 1 – 60
example: zone=32
datum string

Reference frame of the input and the output. WGS 84 only — the sole accepted value is 'wgs84', case-insensitively. NAD 27, NAD 83, ED 50, OSGB36, Tokyo Datum and the other classical datums are deliberately unsupported, because reading their numbers as WGS 84 moves the point by tens to hundreds of metres (FGDC-STD-011-2001 Annex A gives the same physical point as 18SUJ23480647 on NAD 83/WGS 84 and 18SUJ23450626 on NAD 27) and because those datums use the legacy grid-square lettering of NGA.STND.0037 Appendix C. Any other value is a 400 rather than a plausible-looking wrong answer.

default: wgs84
allowed: 1 – 32
example: datum=wgs84
Universal parameters Shared response and formatting options 4
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=system,zone
exclude list

Return all fields except these (comma-separated).

example: exclude=naturalZone
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 18
system string

Grid system used: utm between 80°S and 84°N, ups beyond it.

example: utm

zone integer nullable

UTM zone 1–60; null for UPS, which has no zone number (NGA.STND.0037 §3-2c).

example: 33

band string

Latitude band letter C–X for UTM (I and O are not used), or the polar zone letter A/B in the south and Y/Z in the north.

example: U

gridZoneDesignator string

Zone number plus band letter, or the bare band letter for UPS. When extendedZone is true this names the projection the coordinate was computed in, NOT an area containing the point — see naturalZone.

example: 33U

hemisphere string

north or south. Southern-hemisphere UTM northings carry the 10,000,000 m false northing.

example: north

easting float

Grid easting in metres, rounded to millimetres for display; the 100,000-metre square letters and the truncated MGRS digits are decided from the value snapped to the nearest micrometre, so a coordinate given with sub-millimetre digits can display as a round number while its letters still say which side of the grid line it lies on. Inside a natural UTM zone the easting always falls between 100,000 and 900,000; UPS eastings are measured from a 2,000,000 m false easting.

example: 347090.938

northing float

Grid northing in metres, rounded to millimetres on the same rule as the easting. Southern-hemisphere UTM carries the 10,000,000 m false northing, so the equator is 10,000,000 there and 0 in the north.

example: 6172711.786

convergenceDegrees float nullable

Grid convergence: the azimuth of grid north reckoned clockwise from true north (Karney 2011 Eq. 24). Exactly 0 on a UTM central meridian, positive east of it in the north and negative east of it in the south. null at a pole in UPS, where the meridian is degenerate.

example: -2.0086373

scaleFactor float

Point scale factor of the projection (Karney 2011 Eq. 25). Exactly 0.9996 on a UTM central meridian and 0.994 at a pole in UPS; it reaches about 1.0013 at the western edge of the widened zone 32V.

example: 0.999886803

epsg integer

EPSG code of the (E,N)-ordered CRS: 32600+zone in the north, 32700+zone in the south, 5041 for UPS North and 5042 for UPS South. EPSG 32661/32761 are the same UPS CRSs with N,E axis order.

example: 32633

mgrs string nullable

Canonical MGRS reference at the requested precision, written without spaces (NGA.STND.0037 §3-4b). null when a forced zone makes the coordinate an extended-grid one, for which the standard defines no reference.

example: 33UUB4709072711

mgrsSpaced string nullable

The same reference in the conventional spaced human form. A reading convenience, not the notation the standard prescribes.

example: 33U UB 47090 72711

mgrsPrecisionMeters integer nullable

Side length in metres of the square the reference denotes: 100000, 10000, 1000, 100, 10 or 1.

example: 1

squareId string nullable

The two-letter 100,000-metre square identification on its own (NGA.STND.0037 §3-3).

example: UB

exception string nullable

norway when NGA.STND.0037 Table 7 set this grid zone's extent (31V, 32V), svalbard when Table 8 did (31X, 33X, 35X, 37X), else null.

example: null

exceptionNote string nullable

Prose naming the exception rule and stating that it changes zone extents, never central meridians. null when no exception applies.

example: null

extendedZone boolean

True when the zone parameter forced a projection outside the point's natural zone. The easting may then leave 100,000–900,000 and the scale factor may exceed 1.01 — honest values, not errors.

example: false

naturalZone integer nullable

The UTM zone the point actually falls in, equal to zone unless it was forced; null for UPS.

example: 33

Documented examples

Build-generated requests and complete responses
7
Copenhagen to UTM zone 33N and a 1 m MGRS reference
GET /api/utm-mgrs/from-latlng?lat=55.6761&lng=12.5683
{
  "data": {
    "system": "utm",
    "zone": 33,
    "band": "U",
    "gridZoneDesignator": "33U",
    "hemisphere": "north",
    "easting": 347090.938,
    "northing": 6172711.786,
    "convergenceDegrees": -2.0086373,
    "scaleFactor": 0.999886803,
    "epsg": 32633,
    "mgrs": "33UUB4709072711",
    "mgrsSpaced": "33U UB 47090 72711",
    "mgrsPrecisionMeters": 1,
    "squareId": "UB",
    "exception": null,
    "exceptionNote": null,
    "extendedZone": false,
    "naturalZone": 33
  },
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/from-latlng",
    "params": {
      "lat": 55.6761,
      "lng": 12.5683,
      "precision": 5,
      "datum": "wgs84"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
The FGDC Washington Monument point at 10 m precision
GET /api/utm-mgrs/from-latlng?lat=38.88946731&lng=-77.035240216&precision=4
{
  "data": {
    "system": "utm",
    "zone": 18,
    "band": "S",
    "gridZoneDesignator": "18S",
    "hemisphere": "north",
    "easting": 323483.168,
    "northing": 4306479.498,
    "convergenceDegrees": -1.2780941,
    "scaleFactor": 0.999983687,
    "epsg": 32618,
    "mgrs": "18SUJ23480647",
    "mgrsSpaced": "18S UJ 2348 0647",
    "mgrsPrecisionMeters": 10,
    "squareId": "UJ",
    "exception": null,
    "exceptionNote": null,
    "extendedZone": false,
    "naturalZone": 18
  },
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/from-latlng",
    "params": {
      "lat": 38.88946731,
      "lng": -77.035240216,
      "precision": 4,
      "datum": "wgs84"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Bergen, where the Norway exception puts 5 degrees east in zone 32V
GET /api/utm-mgrs/from-latlng?lat=60.3913&lng=5.3221
{
  "data": {
    "system": "utm",
    "zone": 32,
    "band": "V",
    "gridZoneDesignator": "32V",
    "hemisphere": "north",
    "easting": 297353.933,
    "northing": 6700648.345,
    "convergenceDegrees": -3.1987167,
    "scaleFactor": 1.00010324,
    "epsg": 32632,
    "mgrs": "32VKN9735300648",
    "mgrsSpaced": "32V KN 97353 00648",
    "mgrsPrecisionMeters": 1,
    "squareId": "KN",
    "exception": "norway",
    "exceptionNote": "NGA.STND.0037 Table 7: between 56°N and 64°N, zone 31 ends at 3°E and zone 32 covers 3°E–12°E. The central meridians do not move — zone 32 keeps 9°E, so 32V is 9° wide but still projected about its own meridian.",
    "extendedZone": false,
    "naturalZone": 32
  },
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/from-latlng",
    "params": {
      "lat": 60.3913,
      "lng": 5.3221,
      "precision": 5,
      "datum": "wgs84"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Longyearbyen, in Svalbard zone 33X
GET /api/utm-mgrs/from-latlng?lat=78.2232&lng=15.6267&precision=3
{
  "data": {
    "system": "utm",
    "zone": 33,
    "band": "X",
    "gridZoneDesignator": "33X",
    "hemisphere": "north",
    "easting": 514278.715,
    "northing": 8683355.469,
    "convergenceDegrees": 0.6135091,
    "scaleFactor": 0.999602492,
    "epsg": 32633,
    "mgrs": "33XWG142833",
    "mgrsSpaced": "33X WG 142 833",
    "mgrsPrecisionMeters": 100,
    "squareId": "WG",
    "exception": "svalbard",
    "exceptionNote": "NGA.STND.0037 Table 8: between 72°N and 84°N, zones 32, 34 and 36 do not exist; zone 31 covers 0°–9°E, 33 covers 9°–21°E, 35 covers 21°–33°E and 37 covers 33°–42°E. The central meridians do not move.",
    "extendedZone": false,
    "naturalZone": 33
  },
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/from-latlng",
    "params": {
      "lat": 78.2232,
      "lng": 15.6267,
      "precision": 3,
      "datum": "wgs84"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Near the South Pole, where UTM ends and UPS band B begins
GET /api/utm-mgrs/from-latlng?lat=-89.9&lng=45
{
  "data": {
    "system": "ups",
    "zone": null,
    "band": "B",
    "gridZoneDesignator": "B",
    "hemisphere": "south",
    "easting": 2007850.571,
    "northing": 2007850.571,
    "convergenceDegrees": -45,
    "scaleFactor": 0.994000757,
    "epsg": 5042,
    "mgrs": "BAN0785007850",
    "mgrsSpaced": "B AN 07850 07850",
    "mgrsPrecisionMeters": 1,
    "squareId": "AN",
    "exception": null,
    "exceptionNote": null,
    "extendedZone": false,
    "naturalZone": null
  },
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/from-latlng",
    "params": {
      "lat": -89.9,
      "lng": 45,
      "precision": 5,
      "datum": "wgs84"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Extended grid: the same point forced into neighbouring zone 32
GET /api/utm-mgrs/from-latlng?lat=55.6761&lng=12.5683&zone=32
{
  "data": {
    "system": "utm",
    "zone": 32,
    "band": "U",
    "gridZoneDesignator": "32U",
    "hemisphere": "north",
    "easting": 724351.929,
    "northing": 6175804.022,
    "convergenceDegrees": 2.9481466,
    "scaleFactor": 1.000217445,
    "epsg": 32632,
    "mgrs": null,
    "mgrsSpaced": null,
    "mgrsPrecisionMeters": null,
    "squareId": null,
    "exception": null,
    "exceptionNote": null,
    "extendedZone": true,
    "naturalZone": 33
  },
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/from-latlng",
    "params": {
      "lat": 55.6761,
      "lng": 12.5683,
      "precision": 5,
      "zone": 32,
      "datum": "wgs84"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z",
    "warnings": [
      "Extended grid: the point was projected into zone 32 instead of its natural zone 33, so easting 724,352 and scale factor 1.000217 lie outside the ranges a natural-zone coordinate keeps. The grid zone designator 32U names the projection, not an area containing the point, and NGA.STND.0037 §1-9 defines no MGRS reference for it."
    ]
  }
}
The 100,000-metre square alone, at precision 0
GET /api/utm-mgrs/from-latlng?lat=55.6761&lng=12.5683&precision=0
{
  "data": {
    "system": "utm",
    "zone": 33,
    "band": "U",
    "gridZoneDesignator": "33U",
    "hemisphere": "north",
    "easting": 347090.938,
    "northing": 6172711.786,
    "convergenceDegrees": -2.0086373,
    "scaleFactor": 0.999886803,
    "epsg": 32633,
    "mgrs": "33UUB",
    "mgrsSpaced": "33U UB",
    "mgrsPrecisionMeters": 100000,
    "squareId": "UB",
    "exception": null,
    "exceptionNote": null,
    "extendedZone": false,
    "naturalZone": 33
  },
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/from-latlng",
    "params": {
      "lat": 55.6761,
      "lng": 12.5683,
      "precision": 0,
      "datum": "wgs84"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}

GET /api/utm-mgrs/to-latlng

Supply either the reference text in 'value' or the explicit components, never both. MGRS input returns the square's south-west corner, its centre and its size; a numeric coordinate returns the exact point.

Live requestRuns against the public API
No key required
GET/api/utm-mgrs/to-latlng?value=18SUJ23480647

Request parameters

An MGRS reference ('18SUJ23480647', spaces allowed), or a full UTM/UPS coordinate preceded by its grid zone designator in the form of NGA.STND.0037 §A-4 ('33U 347090 6172712', 'Y 1735147 2243078'). Commas are accepted as separators and letters are case-insensitive. Mutually exclusive with 'easting'/'northing'.

UTM zone for the component form. Omit it to mean UPS, whose polar areas carry no zone number.

Latitude band letter C–X for UTM, or a polar zone letter A/B/Y/Z for UPS. It supplies the hemisphere and, for an MGRS reference, resolves which 2,000,000 m northing cycle the row letter means.

Alternative to 'band' for the component form. When both are given they must agree, otherwise the request is a 400.

Grid easting in metres. Standard UTM eastings run 100,000–900,000 and UPS eastings 800,000–3,200,000; a value outside the range its eight column letters cover is accepted as an extended-grid coordinate, with a warning, and then no MGRS reference is returned.

Grid northing in metres, including the 10,000,000 m false northing for the southern hemisphere in UTM.

Reference frame of the input and the output. WGS 84 only — the sole accepted value is 'wgs84', case-insensitively. NAD 27, NAD 83, ED 50, OSGB36, Tokyo Datum and the other classical datums are deliberately unsupported, because reading their numbers as WGS 84 moves the point by tens to hundreds of metres (FGDC-STD-011-2001 Annex A gives the same physical point as 18SUJ23480647 on NAD 83/WGS 84 and 18SUJ23450626 on NAD 27) and because those datums use the legacy grid-square lettering of NGA.STND.0037 Appendix C. Any other value is a 400 rather than a plausible-looking wrong answer.

Advanced response options4 options

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/utm-mgrs/to-latlng?value=18SUJ23480647"
const res = await fetch("https://randomapi.dev/api/utm-mgrs/to-latlng?value=18SUJ23480647");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/utm-mgrs/to-latlng?value=18SUJ23480647").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/utm-mgrs/to-latlng?value=18SUJ23480647"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 7
value string

An MGRS reference ('18SUJ23480647', spaces allowed), or a full UTM/UPS coordinate preceded by its grid zone designator in the form of NGA.STND.0037 §A-4 ('33U 347090 6172712', 'Y 1735147 2243078'). Commas are accepted as separators and letters are case-insensitive. Mutually exclusive with 'easting'/'northing'.

allowed: 1 – 64
example: value=18SUJ23480647
zone int

UTM zone for the component form. Omit it to mean UPS, whose polar areas carry no zone number.

allowed: 1 – 60
example: zone=33
band string

Latitude band letter C–X for UTM, or a polar zone letter A/B/Y/Z for UPS. It supplies the hemisphere and, for an MGRS reference, resolves which 2,000,000 m northing cycle the row letter means.

allowed: 1 – 1
example: band=U
hemisphere enum

Alternative to 'band' for the component form. When both are given they must agree, otherwise the request is a 400.

allowed: north | south
example: hemisphere=north
easting float

Grid easting in metres. Standard UTM eastings run 100,000–900,000 and UPS eastings 800,000–3,200,000; a value outside the range its eight column letters cover is accepted as an extended-grid coordinate, with a warning, and then no MGRS reference is returned.

allowed: 0 – 4000000
example: easting=347090.938
northing float

Grid northing in metres, including the 10,000,000 m false northing for the southern hemisphere in UTM.

allowed: 0 – 10000000
example: northing=6172711.786
datum string

Reference frame of the input and the output. WGS 84 only — the sole accepted value is 'wgs84', case-insensitively. NAD 27, NAD 83, ED 50, OSGB36, Tokyo Datum and the other classical datums are deliberately unsupported, because reading their numbers as WGS 84 moves the point by tens to hundreds of metres (FGDC-STD-011-2001 Annex A gives the same physical point as 18SUJ23480647 on NAD 83/WGS 84 and 18SUJ23450626 on NAD 27) and because those datums use the legacy grid-square lettering of NGA.STND.0037 Appendix C. Any other value is a 400 rather than a plausible-looking wrong answer.

default: wgs84
allowed: 1 – 32
example: datum=wgs84
Universal parameters Shared response and formatting options 4
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=input,inputForm
exclude list

Return all fields except these (comma-separated).

example: exclude=exceptionNote
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 22
input string nullable

The value parameter exactly as received; null when the components were supplied instead.

example: 18SUJ23480647

inputForm string

How the input was read: mgrs, utm-coordinate, ups-coordinate or components.

example: mgrs

system string

Grid system used: utm between 80°S and 84°N, ups beyond it.

example: utm

zone integer nullable

UTM zone 1–60; null for UPS, which has no zone number (NGA.STND.0037 §3-2c).

example: 18

band string nullable

Latitude band letter C–X for UTM (I and O are not used), or the polar zone letter A/B in the south and Y/Z in the north. For an MGRS reference this is the letter the reference carries; for a numeric coordinate it is the band the decoded latitude falls in — NGA.STND.0037 §A-5 makes the latitude the authority, so a mismatched or hemisphere-style letter is warned about rather than echoed. null only when a numeric coordinate decodes outside the 80°S–84°N band range.

example: S

gridZoneDesignator string nullable

Zone number plus band letter, or the bare band letter for UPS. When extendedZone is true this names the projection the coordinate was computed in, NOT an area containing the point — see naturalZone. For an MGRS reference this is the letter the reference carries; for a numeric coordinate it is the band the decoded latitude falls in — NGA.STND.0037 §A-5 makes the latitude the authority, so a mismatched or hemisphere-style letter is warned about rather than echoed. null only when a numeric coordinate decodes outside the 80°S–84°N band range.

example: 18S

hemisphere string

north or south. Southern-hemisphere UTM northings carry the 10,000,000 m false northing.

example: north

easting float

Grid easting in metres, rounded to millimetres for display; the 100,000-metre square letters and the truncated MGRS digits are decided from the value snapped to the nearest micrometre, so a coordinate given with sub-millimetre digits can display as a round number while its letters still say which side of the grid line it lies on. Inside a natural UTM zone the easting always falls between 100,000 and 900,000; UPS eastings are measured from a 2,000,000 m false easting. For MGRS input this is the south-west corner of the square (NGA.STND.0037 §3-4d).

example: 323480

northing float

Grid northing in metres, rounded to millimetres on the same rule as the easting. Southern-hemisphere UTM carries the 10,000,000 m false northing, so the equator is 10,000,000 there and 0 in the north. For MGRS input this is the south-west corner of the square (NGA.STND.0037 §3-4d).

example: 4306470

convergenceDegrees float nullable

Grid convergence: the azimuth of grid north reckoned clockwise from true north (Karney 2011 Eq. 24). Exactly 0 on a UTM central meridian, positive east of it in the north and negative east of it in the south. null at a pole in UPS, where the meridian is degenerate.

example: -1.2781132

scaleFactor float

Point scale factor of the projection (Karney 2011 Eq. 25). Exactly 0.9996 on a UTM central meridian and 0.994 at a pole in UPS; it reaches about 1.0013 at the western edge of the widened zone 32V.

example: 0.999983701

epsg integer

EPSG code of the (E,N)-ordered CRS: 32600+zone in the north, 32700+zone in the south, 5041 for UPS North and 5042 for UPS South. EPSG 32661/32761 are the same UPS CRSs with N,E axis order.

example: 32618

letterRole string nullable

How the letter after the zone was read: latitude-band (the standard reading, §A-5), hemisphere-designator (only when a band reading is geometrically impossible, and a warning says so), or polar-zone for the UPS letters A/B/Y/Z. null when no letter was supplied.

example: latitude-band

latitude float

WGS 84 latitude of what the reference denotes: the exact point for a numeric coordinate, or the south-west corner of the square for an MGRS reference (NGA.STND.0037 §3-4d).

example: 38.889381136

longitude float

WGS 84 longitude of the same position.

example: -77.035274279

center object nullable

latitude/longitude of the square's centre, which is usually what a map should show. null for numeric input, which is already a point.

example: {"latitude":38.889427169,"longitude":-77.035217949}

square object nullable

eastingMin, northingMin and sizeMeters — the square exactly, in grid metres. No degree bounds are returned: a UTM/UPS square's outline is not a latitude/longitude rectangle. null for numeric input.

example: {"eastingMin":323480,"northingMin":4306470,"sizeMeters":10}

mgrsPrecisionMeters integer nullable

Side length of the square the input denoted, for MGRS input; null for numeric input.

example: 10

mgrs string nullable

Canonical re-encoding of the returned position at full 1 m precision — a round-trip check the caller can see. It uses the zone the coordinate was supplied in, so for an extended-grid coordinate it names a square in that zone's grid even though the point falls outside the zone's own extent, and a warning says so. null in two cases, each warned about: when the coordinate falls outside the 100,000-metre letter grid so no square identification exists (an easting beyond the range the eight column letters cover in UTM, or a position off the lettered cap in UPS), and when a numeric coordinate decodes outside 80°S–84°N, where no latitude band and therefore no grid zone designator exists to write in front of the square — squareId is still returned in that case.

example: 18SUJ2348006470

squareId string nullable

The two-letter 100,000-metre square identification of the returned position.

example: UJ

exception string nullable

norway or svalbard when the decoded position sits in a grid zone whose extent comes from NGA.STND.0037 Table 7 or 8, else null.

example: null

exceptionNote string nullable

Prose naming that exception rule, or null.

example: null

Documented examples

Build-generated requests and complete responses
7
Washington Monument at 10 m precision (FGDC USNG worked example)
GET /api/utm-mgrs/to-latlng?value=18SUJ23480647
{
  "data": {
    "input": "18SUJ23480647",
    "inputForm": "mgrs",
    "system": "utm",
    "zone": 18,
    "band": "S",
    "gridZoneDesignator": "18S",
    "hemisphere": "north",
    "easting": 323480,
    "northing": 4306470,
    "convergenceDegrees": -1.2781132,
    "scaleFactor": 0.999983701,
    "epsg": 32618,
    "letterRole": "latitude-band",
    "latitude": 38.889381136,
    "longitude": -77.035274279,
    "center": {
      "latitude": 38.889427169,
      "longitude": -77.035217949
    },
    "square": {
      "eastingMin": 323480,
      "northingMin": 4306470,
      "sizeMeters": 10
    },
    "mgrsPrecisionMeters": 10,
    "mgrs": "18SUJ2348006470",
    "squareId": "UJ",
    "exception": null,
    "exceptionNote": null
  },
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/to-latlng",
    "params": {
      "value": "18SUJ23480647",
      "datum": "wgs84"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
The same point at 1 m precision
GET /api/utm-mgrs/to-latlng?value=18SUJ2348306479
{
  "data": {
    "input": "18SUJ2348306479",
    "inputForm": "mgrs",
    "system": "utm",
    "zone": 18,
    "band": "S",
    "gridZoneDesignator": "18S",
    "hemisphere": "north",
    "easting": 323483,
    "northing": 4306479,
    "convergenceDegrees": -1.2780951,
    "scaleFactor": 0.999983688,
    "epsg": 32618,
    "letterRole": "latitude-band",
    "latitude": 38.889462791,
    "longitude": -77.035242023,
    "center": {
      "latitude": 38.889467394,
      "longitude": -77.03523639
    },
    "square": {
      "eastingMin": 323483,
      "northingMin": 4306479,
      "sizeMeters": 1
    },
    "mgrsPrecisionMeters": 1,
    "mgrs": "18SUJ2348306479",
    "squareId": "UJ",
    "exception": null,
    "exceptionNote": null
  },
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/to-latlng",
    "params": {
      "value": "18SUJ2348306479",
      "datum": "wgs84"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
The 1,000 m example from NGA.STND.0037 section B-6
GET /api/utm-mgrs/to-latlng?value=45SXT4791
{
  "data": {
    "input": "45SXT4791",
    "inputForm": "mgrs",
    "system": "utm",
    "zone": 45,
    "band": "S",
    "gridZoneDesignator": "45S",
    "hemisphere": "north",
    "easting": 647000,
    "northing": 3791000,
    "convergenceDegrees": 0.8986274,
    "scaleFactor": 0.999866368,
    "epsg": 32645,
    "letterRole": "latitude-band",
    "latitude": 34.249740331,
    "longitude": 88.596418758,
    "center": {
      "latitude": 34.254177016,
      "longitude": 88.60193233
    },
    "square": {
      "eastingMin": 647000,
      "northingMin": 3791000,
      "sizeMeters": 1000
    },
    "mgrsPrecisionMeters": 1000,
    "mgrs": "45SXT4700091000",
    "squareId": "XT",
    "exception": null,
    "exceptionNote": null
  },
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/to-latlng",
    "params": {
      "value": "45SXT4791",
      "datum": "wgs84"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
A UPS North reference from NGA.STND.0037 section B-5
GET /api/utm-mgrs/to-latlng?value=YXK3543
{
  "data": {
    "input": "YXK3543",
    "inputForm": "mgrs",
    "system": "ups",
    "zone": null,
    "band": "Y",
    "gridZoneDesignator": "Y",
    "hemisphere": "north",
    "easting": 1735000,
    "northing": 2243000,
    "convergenceDegrees": -132.5202362,
    "scaleFactor": 0.994793898,
    "epsg": 5041,
    "letterRole": "polar-zone",
    "latitude": 86.762360182,
    "longitude": -132.520236208,
    "center": {
      "latitude": 86.762629287,
      "longitude": -132.632821474
    },
    "square": {
      "eastingMin": 1735000,
      "northingMin": 2243000,
      "sizeMeters": 1000
    },
    "mgrsPrecisionMeters": 1000,
    "mgrs": "YXK3500043000",
    "squareId": "XK",
    "exception": null,
    "exceptionNote": null
  },
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/to-latlng",
    "params": {
      "value": "YXK3543",
      "datum": "wgs84"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Full UTM components with a band letter
GET /api/utm-mgrs/to-latlng?zone=33&band=U&easting=347090.938&northing=6172711.786
{
  "data": {
    "input": null,
    "inputForm": "components",
    "system": "utm",
    "zone": 33,
    "band": "U",
    "gridZoneDesignator": "33U",
    "hemisphere": "north",
    "easting": 347090.938,
    "northing": 6172711.786,
    "convergenceDegrees": -2.0086373,
    "scaleFactor": 0.999886803,
    "epsg": 32633,
    "letterRole": "latitude-band",
    "latitude": 55.676099998,
    "longitude": 12.568299995,
    "center": null,
    "square": null,
    "mgrsPrecisionMeters": null,
    "mgrs": "33UUB4709072711",
    "squareId": "UB",
    "exception": null,
    "exceptionNote": null
  },
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/to-latlng",
    "params": {
      "zone": 33,
      "band": "U",
      "easting": 347090.938,
      "northing": 6172711.786,
      "datum": "wgs84"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Full UPS North coordinate from NGA.STND.0037 section A-4
GET /api/utm-mgrs/to-latlng?value=Y%201735147%202243078
{
  "data": {
    "input": "Y 1735147 2243078",
    "inputForm": "ups-coordinate",
    "system": "ups",
    "zone": null,
    "band": "Y",
    "gridZoneDesignator": "Y",
    "hemisphere": "north",
    "easting": 1735147,
    "northing": 2243078,
    "convergenceDegrees": -132.5452332,
    "scaleFactor": 0.994793652,
    "epsg": 5041,
    "letterRole": "polar-zone",
    "latitude": 86.762860539,
    "longitude": -132.545233238,
    "center": null,
    "square": null,
    "mgrsPrecisionMeters": null,
    "mgrs": "YXK3514743078",
    "squareId": "XK",
    "exception": null,
    "exceptionNote": null
  },
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/to-latlng",
    "params": {
      "value": "Y 1735147 2243078",
      "datum": "wgs84"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
The full UTM coordinate form of NGA.STND.0037 section A-4
GET /api/utm-mgrs/to-latlng?value=15F%2C%20486911%2C%203852087
{
  "data": {
    "input": "15F, 486911, 3852087",
    "inputForm": "utm-coordinate",
    "system": "utm",
    "zone": 15,
    "band": "F",
    "gridZoneDesignator": "15F",
    "hemisphere": "south",
    "easting": 486911,
    "northing": 3852087,
    "convergenceDegrees": 0.1706146,
    "scaleFactor": 0.999602102,
    "epsg": 32715,
    "letterRole": "latitude-band",
    "latitude": -55.477178972,
    "longitude": -93.207081224,
    "center": null,
    "square": null,
    "mgrsPrecisionMeters": null,
    "mgrs": "15FVU8691152087",
    "squareId": "VU",
    "exception": null,
    "exceptionNote": null
  },
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/to-latlng",
    "params": {
      "value": "15F, 486911, 3852087",
      "datum": "wgs84"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}

GET /api/utm-mgrs/zone

Band and zone boundaries are latitude/longitude limits rather than datum-dependent geometry, so this route takes no datum parameter. Exceptions are reported alongside the zone the plain 6-degree rule would have given, so the decision is auditable. Exactly at a pole longitude is degenerate: the polar half reported there is the one NGA.STND.0037 §B-5b's easting rule picks, not one the longitude selected, and a warning says so because the returned longitude limits then describe that half rather than a range containing the point.

Live requestRuns against the public API
No key required
GET/api/utm-mgrs/zone?lat=60.3913&lng=5.3221

Request parameters

Latitude in WGS 84 decimal degrees. From 80°S to 84°N the point projects to UTM; beyond that it projects to UPS with a polar band letter and no zone number. A point exactly on a band boundary belongs to the band north of it, so lat=-80 is band C and lat=84 is band X.

Longitude in WGS 84 decimal degrees; +180 is the same meridian as -180 and falls in zone 1. A point exactly on a zone boundary belongs to the zone east of it, so lng=6 is zone 32.

Advanced response options4 options

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/utm-mgrs/zone?lat=60.3913&lng=5.3221"
const res = await fetch("https://randomapi.dev/api/utm-mgrs/zone?lat=60.3913&lng=5.3221");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/utm-mgrs/zone?lat=60.3913&lng=5.3221").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/utm-mgrs/zone?lat=60.3913&lng=5.3221"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 2
lat float required

Latitude in WGS 84 decimal degrees. From 80°S to 84°N the point projects to UTM; beyond that it projects to UPS with a polar band letter and no zone number. A point exactly on a band boundary belongs to the band north of it, so lat=-80 is band C and lat=84 is band X.

allowed: -90 – 90
example: lat=78.2232
lng float required

Longitude in WGS 84 decimal degrees; +180 is the same meridian as -180 and falls in zone 1. A point exactly on a zone boundary belongs to the zone east of it, so lng=6 is zone 32.

allowed: -180 – 180
example: lng=15.6267
Universal parameters Shared response and formatting options 4
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=system,zone
exclude list

Return all fields except these (comma-separated).

example: exclude=utmValid
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 17
system string

utm inside 80°S–84°N, ups beyond it.

example: utm

zone integer nullable

UTM zone 1–60 after the Table 7/8 exceptions; null for UPS.

example: 33

band string

Latitude band letter, or the polar zone letter A/B/Y/Z.

example: X

gridZoneDesignator string

The full designation, e.g. 33X, or the bare polar letter.

example: 33X

hemisphere string

north or south.

example: north

centralMeridian float nullable

Longitude of the zone's central meridian, 6·zone − 183 for every zone — the exceptions of Tables 7 and 8 change zone extents, never central meridians. null for UPS, whose longitude of origin is 0°E.

example: 15

westDegrees float

Western longitude limit of this grid zone designation area, after the exceptions. Inclusive: a point on the boundary belongs to the zone east of it.

example: 9

eastDegrees float

Eastern longitude limit, exclusive.

example: 21

southDegrees float

Southern latitude limit of the band. Inclusive: a point on the boundary belongs to the band north of it.

example: 72

northDegrees float

Northern latitude limit of the band; 84 for band X, which is 12° tall rather than 8°.

example: 84

widthDegrees float

Longitude span in degrees: 6 normally, 3 for 31V, 9 for 32V/31X/37X and 12 for 33X/35X.

example: 12

heightDegrees float

Latitude span in degrees: 8 for bands C–W, 12 for band X.

example: 12

epsg integer

EPSG code of the corresponding (E,N)-ordered CRS.

example: 32633

exception string nullable

norway, svalbard or null.

example: svalbard

exceptionNote string nullable

Prose naming the exception rule, or null. Every field example on this route describes 33X, so this one carries the Svalbard note.

example: NGA.STND.0037 Table 8: between 72°N and 84°N, zones 32, 34 and 36 do not exist; zone 31 covers 0°–9°E, 33 covers 9°–21°E, 35 covers 21°–33°E and 37 covers 33°–42°E. The central meridians do not move.

naturalZoneWithoutException integer nullable

The zone the plain 6° rule of Table 6 would have given, so the exception is auditable. Equal to zone wherever no exception moved the boundary; null for UPS.

example: 33

utmValid boolean

Whether the point lies inside the 80°S–84°N range in which UTM is portrayed (NGA.STND.0037 §2-4-1a).

example: true

Documented examples

Build-generated requests and complete responses
5
Bergen falls in the widened zone 32V
GET /api/utm-mgrs/zone?lat=60.3913&lng=5.3221
{
  "data": {
    "system": "utm",
    "zone": 32,
    "band": "V",
    "gridZoneDesignator": "32V",
    "hemisphere": "north",
    "centralMeridian": 9,
    "westDegrees": 3,
    "eastDegrees": 12,
    "southDegrees": 56,
    "northDegrees": 64,
    "widthDegrees": 9,
    "heightDegrees": 8,
    "epsg": 32632,
    "exception": "norway",
    "exceptionNote": "NGA.STND.0037 Table 7: between 56°N and 64°N, zone 31 ends at 3°E and zone 32 covers 3°E–12°E. The central meridians do not move — zone 32 keeps 9°E, so 32V is 9° wide but still projected about its own meridian.",
    "naturalZoneWithoutException": 31,
    "utmValid": true
  },
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/zone",
    "params": {
      "lat": 60.3913,
      "lng": 5.3221
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Longyearbyen falls in Svalbard zone 33X
GET /api/utm-mgrs/zone?lat=78.2232&lng=15.6267
{
  "data": {
    "system": "utm",
    "zone": 33,
    "band": "X",
    "gridZoneDesignator": "33X",
    "hemisphere": "north",
    "centralMeridian": 15,
    "westDegrees": 9,
    "eastDegrees": 21,
    "southDegrees": 72,
    "northDegrees": 84,
    "widthDegrees": 12,
    "heightDegrees": 12,
    "epsg": 32633,
    "exception": "svalbard",
    "exceptionNote": "NGA.STND.0037 Table 8: between 72°N and 84°N, zones 32, 34 and 36 do not exist; zone 31 covers 0°–9°E, 33 covers 9°–21°E, 35 covers 21°–33°E and 37 covers 33°–42°E. The central meridians do not move.",
    "naturalZoneWithoutException": 33,
    "utmValid": true
  },
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/zone",
    "params": {
      "lat": 78.2232,
      "lng": 15.6267
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
McMurdo Station in zone 58C
GET /api/utm-mgrs/zone?lat=-77.85&lng=166.67
{
  "data": {
    "system": "utm",
    "zone": 58,
    "band": "C",
    "gridZoneDesignator": "58C",
    "hemisphere": "south",
    "centralMeridian": 165,
    "westDegrees": 162,
    "eastDegrees": 168,
    "southDegrees": -80,
    "northDegrees": -72,
    "widthDegrees": 6,
    "heightDegrees": 8,
    "epsg": 32758,
    "exception": null,
    "exceptionNote": null,
    "naturalZoneWithoutException": 58,
    "utmValid": true
  },
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/zone",
    "params": {
      "lat": -77.85,
      "lng": 166.67
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
North of 84 degrees, where the grid is UPS band Y
GET /api/utm-mgrs/zone?lat=85&lng=-45
{
  "data": {
    "system": "ups",
    "zone": null,
    "band": "Y",
    "gridZoneDesignator": "Y",
    "hemisphere": "north",
    "centralMeridian": null,
    "westDegrees": -180,
    "eastDegrees": 0,
    "southDegrees": 84,
    "northDegrees": 90,
    "widthDegrees": 180,
    "heightDegrees": 6,
    "epsg": 5041,
    "exception": null,
    "exceptionNote": null,
    "naturalZoneWithoutException": null,
    "utmValid": false
  },
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/zone",
    "params": {
      "lat": 85,
      "lng": -45
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
A point on the zone 31/32 boundary belongs to zone 32
GET /api/utm-mgrs/zone?lat=45&lng=6
{
  "data": {
    "system": "utm",
    "zone": 32,
    "band": "T",
    "gridZoneDesignator": "32T",
    "hemisphere": "north",
    "centralMeridian": 9,
    "westDegrees": 6,
    "eastDegrees": 12,
    "southDegrees": 40,
    "northDegrees": 48,
    "widthDegrees": 6,
    "heightDegrees": 8,
    "epsg": 32632,
    "exception": null,
    "exceptionNote": null,
    "naturalZoneWithoutException": 32,
    "utmValid": true
  },
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/zone",
    "params": {
      "lat": 45,
      "lng": 6
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}

GET /api/utm-mgrs/grid-zones

All 1,197 UTM grid zone designation areas (NGA.STND.0037 §3-2b) plus the four polar UPS areas, computed from the standard's own rules. Ordered by band letter A–Z, which is geographic south to north, then by zone ascending. A response returns at most 100 rows — use offset to page.

Live requestRuns against the public API
No key required
GET/api/utm-mgrs/grid-zones?band=V

Request parameters

Keep only designations for this UTM zone. Zone 32 has no row in band X, where it does not exist.

Keep only designations in this band or polar area: C–X for UTM, A/B/Y/Z for UPS. Case-insensitive.

Keep only UTM designations or only the four polar UPS areas.

Keep only the six designations whose extents come from Tables 7 and 8: 31V, 32V, 31X, 33X, 35X and 37X.

Skip this many matching designations before returning up to 100. A warning reports the total match count and the next offset.

Advanced response options6 options

Limit the number of returned records (1–100). Defaults to 100.

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Response format: json envelope, ndjson (one record per line) or csv.

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/utm-mgrs/grid-zones?band=V"
const res = await fetch("https://randomapi.dev/api/utm-mgrs/grid-zones?band=V");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/utm-mgrs/grid-zones?band=V").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/utm-mgrs/grid-zones?band=V"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 5
zone int

Keep only designations for this UTM zone. Zone 32 has no row in band X, where it does not exist.

allowed: 1 – 60
example: zone=32
band string

Keep only designations in this band or polar area: C–X for UTM, A/B/Y/Z for UPS. Case-insensitive.

allowed: 1 – 1
example: band=V
system enum

Keep only UTM designations or only the four polar UPS areas.

allowed: utm | ups
example: system=ups
exceptionsOnly boolean

Keep only the six designations whose extents come from Tables 7 and 8: 31V, 32V, 31X, 33X, 35X and 37X.

default: false
example: exceptionsOnly=true
offset int

Skip this many matching designations before returning up to 100. A warning reports the total match count and the next offset.

default: 0
allowed: ≥ 0
example: offset=1100
Universal parameters Shared response and formatting options 6
count int

Limit the number of returned records (1–100). Defaults to 100.

default: 100
allowed: 1 – 100
example: count=3
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=gridZoneDesignator,system
exclude list

Return all fields except these (comma-separated).

example: exclude=exceptionNote
format enum

Response format: json envelope, ndjson (one record per line) or csv.

default: json
allowed: json | ndjson | csv
example: format=csv
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 15
gridZoneDesignator string

Zone number plus band letter, or the bare polar letter for the four UPS areas.

example: 33X

system string

utm inside 80°S–84°N, ups beyond it.

example: utm

zone integer nullable

UTM zone 1–60 after the Table 7/8 exceptions; null for UPS.

example: 33

band string

Latitude band letter, or the polar zone letter A/B/Y/Z.

example: X

hemisphere string

north or south.

example: north

centralMeridian float nullable

Longitude of the zone's central meridian, 6·zone − 183 for every zone — the exceptions of Tables 7 and 8 change zone extents, never central meridians. null for UPS, whose longitude of origin is 0°E.

example: 15

westDegrees float

Western longitude limit of this grid zone designation area, after the exceptions. Inclusive: a point on the boundary belongs to the zone east of it.

example: 9

eastDegrees float

Eastern longitude limit, exclusive.

example: 21

southDegrees float

Southern latitude limit of the band. Inclusive: a point on the boundary belongs to the band north of it.

example: 72

northDegrees float

Northern latitude limit of the band; 84 for band X, which is 12° tall rather than 8°.

example: 84

widthDegrees float

Longitude span in degrees: 6 normally, 3 for 31V, 9 for 32V/31X/37X and 12 for 33X/35X.

example: 12

heightDegrees float

Latitude span in degrees: 8 for bands C–W, 12 for band X.

example: 12

epsg integer

EPSG code of the corresponding (E,N)-ordered CRS.

example: 32633

exception string nullable

norway, svalbard or null.

example: svalbard

exceptionNote string nullable

Prose naming the exception rule, or null. Every field example on this route describes 33X, so this one carries the Svalbard note.

example: NGA.STND.0037 Table 8: between 72°N and 84°N, zones 32, 34 and 36 do not exist; zone 31 covers 0°–9°E, 33 covers 9°–21°E, 35 covers 21°–33°E and 37 covers 33°–42°E. The central meridians do not move.

Documented examples

Build-generated requests and complete responses
6
Band V, including the two Norway exceptions
GET /api/utm-mgrs/grid-zones?band=V
{
  "data": [
    {
      "gridZoneDesignator": "1V",
      "system": "utm",
      "zone": 1,
      "band": "V",
      "hemisphere": "north",
      "westDegrees": -180,
      "eastDegrees": -174,
      "southDegrees": 56,
      "northDegrees": 64,
      "widthDegrees": 6,
      "heightDegrees": 8,
      "centralMeridian": -177,
      "epsg": 32601,
      "exception": null,
      "exceptionNote": null
    },
    {
      "gridZoneDesignator": "2V",
      "system": "utm",
      "zone": 2,
      "band": "V",
      "hemisphere": "north",
      "westDegrees": -174,
      "eastDegrees": -168,
      "southDegrees": 56,
      "northDegrees": 64,
      "widthDegrees": 6,
      "heightDegrees": 8,
      "centralMeridian": -171,
      "epsg": 32602,
      "exception": null,
      "exceptionNote": null
    },
    {
      "gridZoneDesignator": "3V",
      "system": "utm",
      "zone": 3,
    …
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
The four Svalbard exception designations in band X
GET /api/utm-mgrs/grid-zones?band=X&exceptionsOnly=true
{
  "data": [
    {
      "gridZoneDesignator": "31X",
      "system": "utm",
      "zone": 31,
      "band": "X",
      "hemisphere": "north",
      "westDegrees": 0,
      "eastDegrees": 9,
      "southDegrees": 72,
      "northDegrees": 84,
      "widthDegrees": 9,
      "heightDegrees": 12,
      "centralMeridian": 3,
      "epsg": 32631,
      "exception": "svalbard",
      "exceptionNote": "NGA.STND.0037 Table 8: between 72°N and 84°N, zones 32, 34 and 36 do not exist; zone 31 covers 0°–9°E, 33 covers 9°–21°E, 35 covers 21°–33°E and 37 covers 33°–42°E. The central meridians do not move."
    },
    {
      "gridZoneDesignator": "33X",
      "system": "utm",
      "zone": 33,
      "band": "X",
      "hemisphere": "north",
      "westDegrees": 9,
      "eastDegrees": 21,
      "southDegrees": 72,
      "northDegrees": 84,
      "widthDegrees": 12,
      "heightDegrees": 12,
      "centralMeridian": 15,
      "epsg": 32633,
      "exception": "svalbard",
      "exceptionNote": "NGA.STND.0037 Table 8: between 72°N and 84°N, zones 32, 34 and 36 do not exist; zone 31 covers 0°–9°E, 33 covers 9°–21°E, 35 covers 21°–33°E and 37 covers 33°–42°E. The central meridians do not move."
    },
    {
      "gridZoneDesignator": "35X",
      "system": "utm",
      "zone": 35,
    …
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Every band of zone 32, which is missing from band X
GET /api/utm-mgrs/grid-zones?zone=32
{
  "data": [
    {
      "gridZoneDesignator": "32C",
      "system": "utm",
      "zone": 32,
      "band": "C",
      "hemisphere": "south",
      "westDegrees": 6,
      "eastDegrees": 12,
      "southDegrees": -80,
      "northDegrees": -72,
      "widthDegrees": 6,
      "heightDegrees": 8,
      "centralMeridian": 9,
      "epsg": 32732,
      "exception": null,
      "exceptionNote": null
    },
    {
      "gridZoneDesignator": "32D",
      "system": "utm",
      "zone": 32,
      "band": "D",
      "hemisphere": "south",
      "westDegrees": 6,
      "eastDegrees": 12,
      "southDegrees": -72,
      "northDegrees": -64,
      "widthDegrees": 6,
      "heightDegrees": 8,
      "centralMeridian": 9,
      "epsg": 32732,
      "exception": null,
      "exceptionNote": null
    },
    {
      "gridZoneDesignator": "32E",
      "system": "utm",
      "zone": 32,
    …
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
The four polar UPS areas
GET /api/utm-mgrs/grid-zones?system=ups
{
  "data": [
    {
      "gridZoneDesignator": "A",
      "system": "ups",
      "zone": null,
      "band": "A",
      "hemisphere": "south",
      "westDegrees": -180,
      "eastDegrees": 0,
      "southDegrees": -90,
      "northDegrees": -80,
      "widthDegrees": 180,
      "heightDegrees": 10,
      "centralMeridian": null,
      "epsg": 5042,
      "exception": null,
      "exceptionNote": null
    },
    {
      "gridZoneDesignator": "B",
      "system": "ups",
      "zone": null,
      "band": "B",
      "hemisphere": "south",
      "westDegrees": 0,
      "eastDegrees": 180,
      "southDegrees": -90,
      "northDegrees": -80,
      "widthDegrees": 180,
      "heightDegrees": 10,
      "centralMeridian": null,
      "epsg": 5042,
      "exception": null,
      "exceptionNote": null
    },
    {
      "gridZoneDesignator": "Y",
      "system": "ups",
      "zone": null,
    …
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Paging deep into the index, with the next-offset warning
GET /api/utm-mgrs/grid-zones?count=100&offset=1100
{
  "data": [
    {
      "gridZoneDesignator": "19W",
      "system": "utm",
      "zone": 19,
      "band": "W",
      "hemisphere": "north",
      "westDegrees": -72,
      "eastDegrees": -66,
      "southDegrees": 64,
      "northDegrees": 72,
      "widthDegrees": 6,
      "heightDegrees": 8,
      "centralMeridian": -69,
      "epsg": 32619,
      "exception": null,
      "exceptionNote": null
    },
    {
      "gridZoneDesignator": "20W",
      "system": "utm",
      "zone": 20,
      "band": "W",
      "hemisphere": "north",
      "westDegrees": -66,
      "eastDegrees": -60,
      "southDegrees": 64,
      "northDegrees": 72,
      "widthDegrees": 6,
      "heightDegrees": 8,
      "centralMeridian": -63,
      "epsg": 32620,
      "exception": null,
      "exceptionNote": null
    },
    {
      "gridZoneDesignator": "21W",
      "system": "utm",
      "zone": 21,
    …
    ]
  }
}
The last page of the full index, a single polar row
GET /api/utm-mgrs/grid-zones?count=100&offset=1200
{
  "data": [
    {
      "gridZoneDesignator": "Z",
      "system": "ups",
      "zone": null,
      "band": "Z",
      "hemisphere": "north",
      "westDegrees": 0,
      "eastDegrees": 180,
      "southDegrees": 84,
      "northDegrees": 90,
      "widthDegrees": 180,
      "heightDegrees": 6,
      "centralMeridian": null,
      "epsg": 5041,
      "exception": null,
      "exceptionNote": null
    }
  ],
  "meta": {
    "endpoint": "utm-mgrs",
    "route": "/grid-zones",
    "count": 1,
    "params": {
      "exceptionsOnly": false,
      "offset": 1200
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}

About this API

Coverage & behavior

Grid coordinates, done carefully. /from-latlng projects a WGS 84 point to UTM (between 80°S and 84°N) or UPS (beyond those limits) and encodes it as an MGRS reference; /to-latlng parses a reference or a full grid coordinate back to decimal degrees; /zone reports the grid zone geometry a point falls in; and /grid-zones enumerates the complete index of 1,197 UTM grid zone designations plus the 4 polar areas — computed from the standard's own rules, not typed in by hand, and asserted against NGA.STND.0037 Table 10 in the test suite.

What it implements

  • Ellipsoid: WGS 84 only (NGA.STND.0036), a = 6 378 137 m, 1/f = 298.257 223 563.
  • UTM: k₀ = 0.9996, false easting 500 000, false northing 0 in the north and 10 000 000 in the south, central meridian 6·zone − 183.
  • UPS: Polar Stereographic variant A with k₀ = 0.994 (an exact number by convention), longitude of origin 0°E, false easting = false northing = 2 000 000.
  • The polar 100 km letter grid is a disc, not a rectangle. Figures B-1 and B-2 inscribe their letters in the polar cap, so of the 14 × 14 and 24 × 24 index boxes the letter sets span, only 164 squares in the north and 432 in the south carry an identification. The remaining 176 corner cells lie wholly outside 84°N / 80°S and the figures leave them blank: a reference naming one (YRA, AJA) is a 400, and a grid coordinate landing on one comes back with mgrs: null, squareId: null and a warning. Most libraries accept the whole rectangle.
  • Projection maths: the JHS/Krüger series of IOGP Guidance Note 7-2 §3.2.3.1, with grid convergence and point scale from Karney (2011) Eqs. 23–25. The USGS/Snyder series in the same guidance note is deliberately not used — GN 7-2 warns the two diverge beyond ±4° of the central meridian.
  • Measured accuracy: the implementation reproduces every intermediate of GN 7-2's OSGB worked example to within one unit in the last of the ten digits the guidance note prints, and its meridional arc M₀ = 5 429 228.602 exactly. Its easting comes out 6 mm from the final value printed beside those intermediates — a discrepancy inside the standard's own example, since the published intermediates themselves imply the same 577 274.984 this code produces. The WGS 84 / UPS North example is reproduced exactly. Forward-then-inverse closure over a 50 000-point global lattice is better than 2 × 10⁻¹² degrees — a fraction of a micrometre — and the northing series agrees with a numerically integrated meridian arc to better than a micrometre.

The exceptions, and why the central meridian must not move

Between 56°N and 64°N zone 31 stops at 3°E and zone 32 covers 3°E–12°E (Table 7). Between 72°N and 84°N zones 32, 34 and 36 do not exist, and zones 31/33/35/37 cover 0°–9°E, 9°–21°E, 21°–33°E and 33°–42°E (Table 8). These change zone extents only: zone 32 keeps its 9°E central meridian even though 32V runs from 3°E to 12°E — 6° to the west of that meridian but only 3° to the east — so its eastings run from about 126 000 to 687 000 rather than the usual 166 000–834 000. Zone 31V ends at its own 3°E central meridian, so every easting in 31V is below 500 000. Bergen (60.3913°N, 5.3221°E) lands at 32V easting 297 354 — "fixing" 32V's central meridian to 7.5°E would silently shift every Norwegian coordinate by about 90 km.

An MGRS reference is a square, not a point

Precision is reduced by truncation, never rounding (§3-4c), and the reference names the square's south-west corner (§3-4d). /to-latlng therefore returns the corner as latitude/longitude, the center separately, and the square's size in metres. Truncation is what makes the standard's own ladder work: at 10 m the Washington Monument is 18SUJ23480647, where rounding would give …0648. Grid coordinates are snapped to the nearest micrometre before truncation so representation error cannot flip a digit at a 100 km line.

Ambiguity is refused, never guessed

In 33S 500000 4000000 the S reads either as latitude band S (32°N–40°N) or as a southern-hemisphere designator, and both readings land on real ground. NGA.STND.0037 §A-5 says the letter is the latitude band and that a hemisphere must never be written there, but most GIS tools mean the hemisphere — so this API answers 400 with reason: "ambiguous-band-or-hemisphere" and asks for the explicit components. 33N 500000 4000000 is not ambiguous: band N covers 0°–8°N, which that northing cannot reach, so the letter can only be a hemisphere designator — letterRole says so and a warning explains it. Decoding an MGRS reference resolves the 2 000 000 m northing cycle by enumerating every candidate and keeping the one whose square actually reaches the named band, rather than consulting a minimum-northing-per-band table, which is where most implementations go wrong at band edges.

Scope limits, stated plainly

  1. No datum transformation. WGS 84 in, WGS 84 out; ?datum=nad27 is a 400. FGDC-STD-011-2001 Annex A gives one physical point as 18SUJ23480647 on NAD 83/WGS 84 and 18SUJ23450626 on NAD 27 — about 30 m and 210 m apart.
  2. No legacy lettering. NGA.STND.0037 Appendix C's alternate scheme (row alphabet shifted ten letters) applies only to Bessel 1841 and Clarke 1866/1880 data, never to WGS 84. Older maps of Japan, Korea, North America on NAD 27 and parts of Africa may therefore carry different letters for the same square.
  3. No WGS 84 realization or epoch modelling. WGS 84 is treated as the ensemble; the centimetre-level differences between G873…G2296 and ITRF are not modelled.
  4. Horizontal position only. No heights, no geoid, no vertical datum, no 3D.
  5. Not a geocoder. No place names, addresses or postcodes — see coordinate-formats for notation parsing.
  6. No other reference systems. GARS and GEOREF (NGA.STND.0037 Chapter 4), national grids such as the British National Grid, State Plane Coordinates and proprietary grids are out of scope; geohash and Maidenhead live in geohash and coordinate-formats.
  7. Not a navigation or targeting tool. Correct to the tolerances stated above, but not certified for navigational, legal or safety-critical use.

Every route is a pure synchronous function of its parameters: no randomness, no clock, no dataset, no network. The rules were last checked against the cited documents on 2026-07-30.

Use it for

  • Turn stored latitude/longitude into an MGRS reference for a field report, SAR grid or military-format export
  • Parse MGRS and USNG references pasted from maps, radios or GIS exports back into WGS 84 decimal degrees
  • Reproject a point into UTM eastings and northings for a metric survey, CAD drawing or EPSG-tagged dataset
  • Look up which grid zone, band letter and central meridian apply before configuring a projected coordinate system
  • Test grid-handling code against the Norway and Svalbard zone exceptions and the 84°N/80°S UTM-to-UPS handover

Frequently asked questions

How do I convert latitude and longitude to MGRS with an API?

Call /from-latlng?lat=55.6761&lng=12.5683. The response carries the MGRS reference at 1 m precision by default, plus the underlying UTM zone, easting and northing, the grid convergence and the point scale factor. No key and no signup.

Why is Norway in zone 32V instead of 31V?

Table 7 of NGA.STND.0037 widens zone 32 between 56°N and 64°N: zone 31 stops at 3°E and zone 32 covers 3°E–12°E. The exception changes extents only — zone 32 keeps its 9°E central meridian, so 32V is 9° wide but still projected about that meridian. /zone reports the extent, the exception and the central meridian together.

What happens above 84 degrees north or below 80 degrees south?

UTM is only portrayed between 80°S and 84°N, so beyond those limits the response switches to UPS: system becomes ups, zone is null and the band letter is Y or Z in the north and A or B in the south. Nothing is extrapolated past the grid's defined extent.

Does this API support NAD 27, ED 50 or other datums?

No — WGS 84 only, and ?datum=nad27 returns 400. Reading another datum's numbers as WGS 84 moves the point: FGDC-STD-011-2001 gives the same physical point as 18SUJ23480647 on NAD 83/WGS 84 and 18SUJ23450626 on NAD 27.

In 33S 500000 4000000, is the S the latitude band or the southern hemisphere?

Both readings are geographically valid, so the API returns 400 rather than guessing. NGA.STND.0037 §A-5 says the letter is the latitude band (32°N–40°N) and that a hemisphere must never be written there, but many tools mean the hemisphere — supply zone, hemisphere, easting and northing explicitly instead.

Is an MGRS reference a point or a square?

A square. Precision is reduced by truncation, not rounding (§3-4c), and the reference names the square's south-west corner (§3-4d). /to-latlng returns that corner as latitude/longitude, the center separately, and the square's size in metres.

Standards & references