How to Convert OS Grid to GPS

Written by declan maher
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Convert OS Grid to GPS
The Ordance Survey now provides maps in digital form. (map image by araraadt from

The Global Positioning System is a satellite-based navigation system used for air and ground travel. The Ordnance Survey is a mapping system for Great Britain. GPS and the OS system use different models for their coordinate systems: GPS uses longitude and latitude, while OS Grid References are based on 100-km. grid squares identified by letter-pairs. The OS uses a six-digit reference to pinpoint each coordinate inside this grid. Use JavaScript functions to convert OS grid coordinates to GPS.

Skill level:

Other People Are Reading


  1. 1

    Open Notepad.

  2. 2

    Copy and paste the JavaScript functions to convert latitude and longitude to OS grid points (see Resources) into Notepad.

  3. 3

    Create textboxes by pasting this form into Notepad:

    <form name="f" action="none!">

        &lt;table &gt;


            &lt;td&gt;OS Grid Ref&lt;/td&gt;
            &lt;td colspan="3"&gt;&lt;input name="gridRef" id="gridRef" value="TG 5140 1317" size="12"&gt;&lt;/td&gt;
            &lt;td&gt;&lt;input name="latWGS84" id="latWGS84" value="" size="12"&gt;&lt;/td&gt;
            &lt;td&gt;&lt;input name="lonWGS84" id="lonWGS84" value="" size="12"&gt;&lt;/td&gt;

    <tr><td><input type="submit"></td></tr>

  4. 4

    Add this JavaScript function to the Notepad document:

    <script type="text/javascript" src=""></script>

    <script type="text/javascript">

    $(document).ready(function() {

    $('#grid Ref').change( function() {

      var pOSGB = OSGridToLatLong($('#grid Ref').val());
      var pWGS = convertOSGB36toWGS84(pOSGB);



  5. 5

    Save the Notepad document with an ".html" extension. Open it in your browser.

  6. 6

    Enter the OS Grid reference in the "OS Grid Ref" text field and click the "Submit" button. The equivalent GPS coordinates will appear in the "Latitude" and "Longitude" text boxes.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.