Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can anyone please guide me on converting Military Grid Reference System (MGRS) to lat/long or UTM.

share|improve this question

I had to write code to convert MGRS to LL last year, however I am unable to post the code. What I can post though are the two main resources I utilized while writing the code:

US Military Grid Reference System description, published by NGA and the related Appendix and an Online MGRS to LL Converter to check your results as you are coding.

edit: There is also GeographicLib, an open source library that has code for MGRS conversions, and is licensed under MIT. You'll need to look at the GeographicLib::MGRS class, and the MGRS.hpp and MGRS.cpp files if you need to look at the code.

edit #2: If you can elaborate more on whether you are looking for code, a library, or a utility to convert one or more coordinates, you'll get better answers.

share|improve this answer
Thank you for the quick response! Basically I am looking for some formula/code to convert MGRS to lat long or UTM. I am working with Silverlight API and I want to locate the point based on MGRS input. – Rahul Oct 5 '11 at 18:25
My suggestion then is to look at GeographicLib and either compile the code as a DLL and use the DLL + PInvoke to access the methods from C#, or convert the relevant C++ code to C# (2nd option would be my preferred route). Of course, assuming your project is compatible with a MIT style license. – Sasa Ivetic Oct 5 '11 at 18:28
Thank you Sasa for your quick responses. – Rahul Oct 6 '11 at 17:41

If someone needs this in Javascript...

Probably worth linking to this question now, which includes a link to a GPL'd (unfortunately; LGPL would have been more universally useful) Javascript lib that'll do this.

I'm sorry -- I should probably add that the lib is, more accurately, USNG, which is apparently very closely related to MGRS but not exactly the same.

When referenced to NAD 83 or WGS 84, USNG values are equivalent to Military Grid Reference System (MGRS) values. The difference in these two systems is that USNG referenced to NAD27 uses the MGRS WGS 84 scheme of 100,000m Square Identifications...

(from the above link to The American Surveyor)

It looks like OpenLayers lets you do it as well -- example of it in a production environment (MIT-flavor license) here.

share|improve this answer

GDAL has a silent implementation of MGRS.

You can find the source code here:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.