bng2latlong API

⭐ Beginner's Pick Geocoding / No Auth Required Beginner HTTPS CORS
Free to Use Varies (check documentation)

Overview

bng2latlong is a simple, free API that converts British National Grid (OSGB36) easting and northing coordinates into standard WGS84 latitude and longitude. It requires no API key and is perfect for working with UK-specific geographic data like Ordnance Survey maps. If you are building applications with UK location data, this API saves you from implementing the coordinate conversion math yourself.

💡

Beginner Tip

Easting and northing are the two numbers in a British National Grid reference (e.g., 651409, 313177). Pass them as query parameters and you will get back a standard lat/long pair ready to use in Google Maps or Leaflet.

Available Data

repository name and description
star and fork counts
contributor data
issues and pull requests
commit history
country name and code

Example Response

JSON Response
{
  "name": "Japan",
  "capital": "Tokyo",
  "population": 125800000,
  "region": "Asia",
  "languages": [
    "Japanese"
  ],
  "flag": "https://flagcdn.com/jp.svg",
  "currencies": [
    {
      "code": "JPY",
      "name": "Japanese yen"
    }
  ]
}

Field Reference

status Result status, either ok for a successful conversion or error if the input was invalid.
easting The easting value that was passed in the request.
northing The northing value that was passed in the request.
latitude WGS84 latitude of the converted coordinate.
longitude WGS84 longitude of the converted coordinate.

Implementation Example

const url = "https://www.getthedata.com/bng2latlong";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

400 Bad Request The easting or northing value is outside the valid range for the British National Grid.
Valid easting values are 0–700000 and northing values are 0–1300000. Check that your inputs fall within these bounds.
status: error in response Non-numeric or malformed values were passed as the easting or northing parameters.
Ensure both parameters are integers. Strip any leading letters (e.g., from a full grid reference string) before sending.
Coordinates seem wrong You may have accidentally swapped the easting and northing values in the URL.
The URL format is /bng2latlong/{easting}/{northing}. Easting is the horizontal (X) value and northing is the vertical (Y) value.

Matrix Score Breakdown

🌐 Reachability 0/30
⚡ Speed 15/20
🔒 Security 15/15
🛠 Developer XP 20/20
✓ Reliability 7/15
Response Time 389ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Geocoding
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →