Shorten a Plus Code
The shortest form of a full Plus Code that still recovers uniquely near a reference point (such as the nearest town).
The short code is 9G8F+6X.
- Removed prefix
Provenance
- Computed by
- indexing.plus-code.shorten 1.1.0, core 0.1.0
- Model
- Remove 4, 6, or 8 leading digits while the reference is within 0.3 of that digit's resolution
- Accuracy
- Exact
- Notes
- None
- Cites
- Google, open-location-code project, Open Location Code: Specification
Something look off?
How we got thisFormula, worked example, sources, and proof
Model: Remove 4, 6, or 8 leading digits while the reference is within 0.3 of that digit's resolution
Accuracy: Exact
When to use this: Use this to make a Plus Code short enough to say: given a full code and a nearby reference point, such as a town, it drops the leading characters that the reference already implies, while keeping the code recoverable. It is what makes a Plus Code usable in speech and on paper: the full code is precise but long, and the short form with a town name is what fits on a sign, a form, or a delivery note.
Limitations: A short code only works with its reference: the same short code near a different town names a different place, so the reference has to travel with it. How much can be dropped depends on how close the reference is, and a reference too far away leaves the code unshortened rather than ambiguous. Shortening is only safe relative to the reference you used: pairing a short code with a different town, or dropping the town, gives a code that recovers somewhere else. Keep the reference with the code.
Worked example: 8FVC9G8F+6X near 47.4, 8.6. Source: Open Location Code shortening rule. It is golden test vector v001, and every build checks the tool still gives its answer within its tolerance.
You enter
- Plus Code
- 8FVC9G8F+6X
- Reference latitude
- 47.4 deg
- Reference longitude
- 8.6 deg
You get
- Short code
- 9G8F+6X
- Removed prefix
- 8FVC
Review: Not yet independently reviewed by a GIS professional.
Last verified: 2026-09-18, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.
Status: version 1.1.0, core 0.1.0. See this tool in the verification report.
Changes
- 2026-09-19, changed: Every indexing tool is now stable. Geohash decode and neighbors match pygeohash on 1,000 and 500 cases; the Plus Code tools pass every row of the Open Location Code test data; tile ground resolution matches the Bing Maps table; the H3 resolution chooser matches H3's resolution table; and H3 polygon fill gives H3 C's own test counts (1,253 cells, 1,214 with a hole). Results are unchanged apart from the fix below. Changelog
- 2026-09-19, fixed: Shortening an 8-digit Plus Code next to its own center returned a bare "+", which is not a valid code. It now keeps the last pair (for example 8F+), so the short code always recovers. The tool is now version 1.1.0. Changelog
Checked against: 21 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.
Sources
- Open Location Code: Specification, Google, open-location-code project, Specification in the project repository. Encoding, decoding, shortening, and short-code recovery. Read free.