# mgrs

> Utility for converting between WGS84 lat/lng and MGRS coordinates

Latest version **2.2.0** (published 2026-07-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install mgrs
pnpm add mgrs
yarn add mgrs
bun add mgrs
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2026-07-11 |
| First published | 2013-12-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 121.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 112 |
| Author | proj4 team |
| Maintainers | ahocevar, cwmma, danieljdufour |
| Keywords | geodesy, mgrs, proj4, gis |

## Links

- npm: https://www.npmjs.com/package/mgrs
- Repository: https://github.com/proj4js/mgrs
- Homepage: https://github.com/proj4js/mgrs#readme
- Issues: https://github.com/proj4js/mgrs/issues
- npm.io page: https://npm.io/package/mgrs

## Recent versions

- 2.2.0 (latest) — 2026-07-11
- 1.0.1-alpha.0 (next) — 2022-09-25
- 2.1.0 — 2025-01-05
- 2.0.0 — 2023-03-18
- 1.0.0 — 2017-01-25
- 0.0.3 — 2015-08-07
- 0.0.2 — 2015-08-06
- 0.0.1 — 2015-01-20
- 0.0.0 — 2013-12-07

## README

mgrs
====

Utility for converting between WGS84 lat/lng and MGRS coordinates, spunoff from [proj4js](https://github.com/proj4js/proj4js)

has 3 methods

- forward, takes an array of `[lon,lat]` and optional accuracy and returns an mgrs string
- inverse, takes an mgrs string and returns a bbox. 
- toPoint, takes an mgrs string, returns an array of '[lon,lat]'

install dev dependencies with 

```bash
npm install
```

test with

```bash
npm test
```

build with

```bash
npm run build
```


Licensed under the MIT license except:

Portions of this software are based on a port of components from the OpenMap
com.bbn.openmap.proj.coords Java package. An initial port was initially created
by Patrice G. Cappelaere and included in Community Mapbuilder
(http://svn.codehaus.org/mapbuilder/), which is licensed under the LGPL license
as per http://www.gnu.org/copyleft/lesser.html. OpenMap is licensed under the
[this license agreement](openmap.md)

# references:
- Wikipedia: https://en.wikipedia.org/wiki/Military_Grid_Reference_System
- GEOTRANS: https://earth-info.nga.mil/#geotrans

---
_Source: https://npm.io/package/mgrs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
