How to convert coordinates between formats, and the misreading that puts you 700 metres out
Degrees and decimal minutes read as degrees, minutes and seconds puts you up to seven hundred and twenty-nine metres out, and looks entirely reasonable on the page. Here is why the three formats are confused, what a datum is and why it moves a point by a hundred metres, and the one conversion that is better refused than approximated.
Paste the coordinate into BEARING. It prints the reading it took beside the answer — degrees and minutes, or degrees, minutes and seconds — and refuses anything genuinely ambiguous instead of guessing. It converts between decimal degrees, DMS, decimal minutes, UTM and MGRS, and gives distance and bearing on both a sphere and the WGS84 ellipsoid so you can see how much the choice is worth. Nothing is uploaded, and the page works with the network switched off.
The same three numbers, two places, seven hundred metres apart
This is the error that actually happens, and it happens silently.
A latitude can be written three ways. 51.4778 is decimal degrees. 51° 28.667' is degrees and decimal minutes — the format a marine GPS and most aviation charts use. 51° 28' 40" is degrees, minutes and seconds. All three are the same place.
The trouble is what happens when the symbols are stripped, which is what a spreadsheet column, a radio message or a hand-written note usually does. 51 28 40 can be read as either of the last two. Read as seconds it is 51.477778. Read as decimal minutes it is 51.473333. That is 494 metres of latitude, and both readings look completely reasonable.
| Written | As d m s | As d m.mm | Apart |
|---|---|---|---|
| 51 28 05 | 51.468056 | 51.467500 | 62 m |
| 51 28 20 | 51.472222 | 51.470000 | 247 m |
| 51 28 40 | 51.477778 | 51.473333 | 494 m |
| 51 28 59 | 51.483056 | 51.476500 | 729 m |
The gap is the seconds figure divided by nine thousand, in degrees. It is nothing at all when the seconds are small and most of a kilometre when they are large, which is the worst possible behaviour: the error is invisible in exactly the test case somebody picks to check the converter with.
There is no clever way round this. The only honest options are to know which format the source uses, or to have the converter tell you which one it assumed. A tool that silently picks one is fine ninety-five per cent of the time and catastrophic the rest, and you will not be able to tell the difference afterwards.
The datum, which is the one that catches professionals
Two coordinates can be in the same format, both correct, and describe places a hundred metres apart, because a latitude and longitude are only meaningful against a model of the shape of the earth. That model is the datum.
Almost everything digital — GPS, phones, web maps, aviation, shipping — is WGS84. National mapping is frequently not. Great Britain's Ordnance Survey maps are on OSGB36; Ireland has its own; so do most countries, and many of those national datums predate satellites and were fitted to their own country rather than the whole planet. Between WGS84 and OSGB36 the same point differs by roughly seventy to a hundred and thirty metres depending where in Britain you are.
So "convert these coordinates to the national grid" is two operations, not one: a change of datum, and then a projection. Most free converters do the second and quietly skip or approximate the first.
Why the British National Grid is not offered here
Converting WGS84 to an Ordnance Survey grid reference properly requires OSTN15, a transformation published as a grid of corrections — because the difference between the two datums is not a simple rotation and shift, it varies across the country in a way that has to be tabulated rather than calculated.
The shortcut almost every free converter uses instead is a seven-parameter Helmert transformation, which treats the difference as a rigid rotation, shift and scale. It is about five metres out, and hardly any of the tools that use it say so.
Five metres is nothing for a country walk and a great deal for a scene, a boundary, a utility strike or a search area. Rather than hand back a number that is quietly wrong, BEARING does not offer the conversion at all, and says why on the page. If you need a real OS grid reference, use the Ordnance Survey's own transformation; if you only need to find the place, WGS84 into any map will do it.
UTM and MGRS, and the exceptions everyone leaves out
UTM and MGRS are offered, because they are projections of WGS84 with no datum change in them — the arithmetic is exact and self-contained. What separates a correct implementation from a nearly-correct one is three irregularities in the zone layout that a naive formula gets wrong:
- South-west Norway. Zone 32 is widened westwards so that the country is not split down the middle. A coordinate near Bergen that a formula puts in zone 31 is really in 32.
- Svalbard. Four zones are widened and three removed, so 32X, 34X and 36X do not exist and 31X, 33X, 35X and 37X are unusually wide.
- Band X is twelve degrees deep, not eight like every other band, so that the lettered bands reach 84° north without adding another one.
These matter precisely where somebody is most likely to be relying on a grid reference and least likely to be able to check it: the Arctic. An implementation that handles them is right everywhere anybody would think to test it and right where they would not.
Distance: a sphere or the real shape
Two points, two answers. The haversine formula treats the earth as a sphere and is quick and simple. Vincenty's method works on the WGS84 ellipsoid and is right to well under a millimetre. The difference is not academic:
| Between | Sphere | Ellipsoid | Out by |
|---|---|---|---|
| Two points 5 km apart in a city | 5 004 m | 5 007 m | 3 m |
| London and Edinburgh | 533 653 m | 534 334 m | 681 m |
| Ten degrees of longitude at 60° N | 555 446 m | 557 469 m | 2 023 m |
| London and New York | 5 570 230 m | 5 585 234 m | 15 004 m |
Across a town it is three metres and nobody cares. Across an ocean it is fifteen kilometres. Both figures are given, with the gap in metres and as a percentage, because only the person using the number knows which side of "it does not matter" they are on.
Vincenty's method does not converge for two points almost exactly opposite each other on the earth. Where that happens it says so rather than quietly returning the spherical figure, which is what a tool that hides the failure would leave you holding.
The midpoint is not the average
Averaging two latitudes and two longitudes does not give the point halfway between them. It gives a point that drifts further off the great-circle path the further apart and the higher in latitude the two points are — between two places at sixty degrees north it is visibly wrong on a map. The midpoint of a great circle is a separate calculation, and it is the one used here.
The short version
| The job | Here | Notes |
|---|---|---|
| Decimal degrees, DMS and decimal minutes, any direction | Yes | And it prints which reading it took |
| Refuse an ambiguous coordinate rather than guess | Yes | The whole point |
| UTM and MGRS, with the Norway and Svalbard exceptions | Yes | And band X at twelve degrees |
| Distance and bearing on the ellipsoid | Yes | Vincenty, with the spherical figure beside it |
| Destination from a bearing and a range | Yes | And the great-circle midpoint |
| A whole column at once | Yes | Paste it in; CSV back out |
| Keep the coordinates off a server | Yes | Works with the network off |
| British National Grid | No | Needs OSTN15; the shortcut is 5 m out |
| Other national datums | No | Same reason |
| What3words or a postcode | No | Those are lookups, not conversions |
Why it matters that it stays on your machine
A coordinate is a place, and the places people convert are rarely neutral: an address, a scene, a site under survey, a search area, the spot a photograph was taken. Pasting a column of them into a website tells that website where the subject of your work is, and the record of having asked sits in a log you cannot see.
The arithmetic here is a few hundred lines and needs nothing but the browser. Load the page, turn the network off, and convert. That it still works is the only assurance that does not rest on trusting somebody.
Questions people ask about converting coordinates