Input
Lat/long dd mm.mmm
Lat/long dd mm ss.ss
Lat/long dd.ddddd
OS Grid Numeric
OS Grid Traditional
UTM
Open Location Code (+ Code)
UK County (1974 boundaries)
Accuracy (metres)
The most common UTM format uses latitude bands from C in the far south to X in the far north.
The latitude also partly specifies the band. If you supply a band that conflicts with the latitude, the program will use the latitude band only to determine the N/S hemisphere, and will warn you about the error.
The alternative to latitude bands is to specify the hemisphere using N/S. These examples are for Nelson's Column in London ...
Using latitude band - 30U 699312 5710154
Using hemisphere - 30N 699312 5710154
Adds degree, minute & second symbols to the DM & DMS outputs, and removes the comma separator from the D output.
Pressing the Debug button after a conversion to display the sequence of alternatives the program has tried, why it skipped over them, and the one it finally used. Press the button again to remove the information.
Debug ----------
coords.htm
Co-ordinate and co-ordinate format conversion for smartphone screens.
Contact: Andy Lawrie andy@amberel.com
Version 2.2 26/11/2024
Primary changes since previous major version ...
Added Open Location Code (Google Plus Code) support.
Removed what3words conversion entirely (w3w license change).
Removed multiple input mode (survey indicated no-one used this mode).
Separate Copy buttons for each format.
Added debug sequence.
Converts between different lat/long formats, GB OS National Grid formats, UTM, Open Location Code (Google Plus Code) UK postcodes and GB counties (one way).
Type or paste into the Input box and tap the Convert button. Examples:
dd mm.mmm ... N51 42.729 W000 24.853
dd mm ss.ss ... N51 42 35.26 W000 24 54.82
dd.ddddd ... 51.75639 -0.43286
E & N are positive, W & S are negative. Use N, S, E, W, + and - prefixes or suffixes to specify the hemisphere (not required for E or N).
Degree, minute & second symbols are accepted in the appropriate places but are not required. For Degrees, use a comma or space separator, or a comma followed by a space.
OS Grid numeric format is 4 to 6 digits each for Eastings and Northings (7 for Northings in north of Scotland). You will be warned about low resolution if you use only 4 or 5. Traditional format is 2 letters followed by 3 to 5 digits each. Use a space to separate Eastings & Northings.
Postcode can only be converted into lat/long, not the other way round.
Copy the output to the clipboard by tapping the Copy button next to the desired format.
This program can use location services provided by your browser to populate the boxes. If you are asked to permit the web page to use your location you should, of course, allow it to do so. You should also use the https protocol instead of http, though the program will attempt to redirect automatically you should you use http.
Location services on mobile browsers vary significantly in their behaviour. Some may return a low accuracy fix if a high accuracy fix is not available, even if high accuracy is requested. The reported accuracy is therefore displayed. If you enter co-ordinates manually, the accuracy is shown as 0 metres.
The accuracy shown is that reported by the phone's API. This is usually expressed as the 95% CEP (circular error probable) figure, i.e. the distance to which the location should be accurate 95% of the time. This should be the same method used by other apps on the same device.
The time taken to return the location is variable. If the GPSr is already powered up and in use by a native application, the browser should return immediately.
A full Open Location Code consists of 11 characters and a + symbol. The code can be abbreviated by omitting the last character, or the last 3 characters, at the expense of resolution. It can also be abbreviated by omitting the first 4 characters, but this results in an ambiguous code.
The program will encode a full code, leaving you to abbreviate it yourself if you wish.
The program will decode an 8, 10 or 11 character code, but for the first two, the result will have low resolution.
The program will not attempt to decode a plus code that has the first 4 characters omitted.
If the co-ordinates are in England, Scotland or Wales the page will display the county.
County boundaries change periodically. The program uses the 1974 boundaries because these are the only ones for which I have been able to obtain appropriate polygon data. I believe they are the same as those used by GSAK, but they are not the same as used by Project GC.
Sources of error include the resolution of the polygons and inaccuracies in the supplied location. The program will look beyond the immediate location to see if you are near a county boundary, and if so will warn you, as the result is less reliable. How near is "near" depends on the accuracy.
Avon | Bedfordshire |
Berkshire | Buckinghamshire |
Cambridgeshire | Central |
Cheshire | Cleveland |
Clwyd | Cornwall |
Cumbria | Derbyshire |
Devon | Dorset |
Dumfries and Galloway | Durham |
Dyfed | East Sussex |
Essex | Fife |
Gloucestershire | Grampian |
Greater London | Greater Manchester |
Gwent | Gwynedd |
Hampshire | Hereford and Worcester |
Hertfordshire | Highland |
Humberside | Isle of Man |
Isle of Wight | Kent |
Lancashire | Leicestershire |
Lincolnshire | Lothian |
Merseyside | Mid Glamorgan |
Norfolk | North Yorkshire |
Northamptonshire | Northumberland |
Nottinghamshire | Orkney Islands |
Oxfordshire | Powys |
Scottish Borders | Shetland |
Shropshire | Somerset |
South Glamorgan | South Yorkshire |
Staffordshire | Strathclyde |
Suffolk | Surrey |
Tayside | Tyne and Wear |
Warwickshire | West Glamorgan |
West Midlands | West Sussex |
West Yorkshire | Western Isles |
Wiltshire |