Recover a shortened Plus Code from nearby coordinates
A shortened Plus Code is convenient when the general area is already understood, but it cannot identify a place by itself.
Run — free
This tool restores the missing prefix by combining the short Open Location Code with a nearby reference latitude and longitude. It returns the recovered full code, its center coordinate, and the latitude and longitude boundaries of the encoded area. The calculation is deterministic, runs without a map lookup, and follows the cell-selection rules used by Open Location Code recovery.
Why a shortened Plus Code needs a reference point
A full Plus Code contains coarse location characters at the beginning and progressively finer characters toward the end. A shortened code deliberately removes some of that coarse prefix because people exchanging the code already know the city, neighborhood, or nearby landmark. For example, a local sign or message may show only a few characters before the plus sign. Those remaining characters describe repeating grid cells around the world, so the text alone is ambiguous. Recovery supplies the missing context as a reference latitude and longitude. The calculator first encodes that nearby coordinate at standard pair precision, takes exactly as many leading characters as the short code omitted, and joins that prefix to the supplied code. It then checks the center of the resulting cell against the reference point. This process does not search for an address, business, road, or administrative area. It restores the geographically nearest complete Open Location Code that is consistent with the shortened text and reference coordinates. A reference from the same locality is therefore the essential piece of information, not an optional accuracy hint.
How the nearest matching code is selected
Simply copying a prefix from the reference coordinate is usually enough, but locations close to a grid boundary need one more step. The provisional full code is decoded into a rectangular area with a center and north, south, east, and west limits. The calculator determines the resolution of the omitted prefix and compares the provisional center with the reference. If the center lies more than half of that resolution away, it shifts the candidate by one matching grid cell toward the reference, while respecting the latitude limits at the poles. Longitude is normalized across the antimeridian, so a nearby point on the other side of 180 degrees does not force a distant result. The final code is decoded again and returned with explicit bounds and center coordinates. This mirrors the intended nearest-area interpretation of a short Plus Code. It does not claim that the center is a building entrance or that every point in the returned cell has the same postal address. The bounds describe the encoded grid area, while the full code is the portable identifier you can store or pass to another Open Location Code implementation.
Choosing coordinates and interpreting the result
Use a coordinate that is genuinely near the place where the short code was created. A town center, a previously known waypoint, or the current GPS position can work when it is in the same local area. Greater shortening removes more of the geographic prefix and makes the acceptable reference area smaller in practical terms: an imprecise or distant reference can select a different repeating cell that still matches the remaining characters. After recovery, inspect both the full_code value and the returned center. The latitude_lo, latitude_hi, longitude_lo, and longitude_hi fields show the exact rectangle encoded by the result and are useful for map fitting or containment checks. Keep the original short code and reference coordinate in an audit record when reproducibility matters, because the full result is derived from both. Inputs are handled as decimal degrees, latitude must remain between the poles, and longitude must remain within the conventional signed range. The operation uses no network service, map database, current time, or random choice. The same valid input therefore produces the same recovered code and numeric area every time, whether called interactively or through an automated workflow at $0.002 per request.
What you can do with it
Complete a code received in a local message
Combine a neighborhood-level short code with a known nearby coordinate before storing or sharing it globally.
Normalize field survey records
Turn shortened codes and survey reference coordinates into full identifiers with explicit decoded bounds.
Prepare navigation data for another system
Recover portable full codes before exporting waypoints to software that does not accept shortened Plus Codes.
FAQ
What is required to recover a shortened Plus Code?
Provide the shortened code plus a nearby latitude and longitude in decimal degrees. All three values are required because the omitted prefix represents location context.
How close must the reference coordinate be?
It should be in the same locality as the intended place. The more characters omitted from the code, the more important a genuinely nearby reference becomes.
Can this recover an address or place name?
No. It performs Open Location Code arithmetic only. It does not query maps, geocoders, business listings, or postal databases.
Why are bounds included with the full code?
A Plus Code represents an area rather than an infinitely precise point. The bounds and center make that encoded rectangle explicit.
Can I submit an already complete Plus Code?
No. This capability specifically recovers shortened codes and rejects a code whose plus sign is already in the full-code position.
What does an API request cost?
Each API request costs $0.002. The browser version runs locally without sending the calculation to a map service.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/geo/plus-code-recover \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"short_code":"9G8F+6X","latitude":47.36559,"longitude":8.524997}'const res = await fetch("https://api.kit.forhosting.com/geo/plus-code-recover", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"short_code": "9G8F+6X",
"latitude": 47.36559,
"longitude": 8.524997
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geo/plus-code-recover",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"short_code": "9G8F+6X",
"latitude": 47.36559,
"longitude": 8.524997
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geo/plus-code-recover", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"short_code":"9G8F+6X","latitude":47.36559,"longitude":8.524997}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"short_code":"9G8F+6X","latitude":47.36559,"longitude":8.524997}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geo/plus-code-recover", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"short_code": "9G8F+6X",
"latitude": 47.36559,
"longitude": 8.524997
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geo.plus_code_recover",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |