HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
google
open-location-code
Java2015–2024
google / open-location-code

open-location-code

Open Location Code is a library to generate short codes, called "plus codes", that can be used as digital addresses where street addresses don't exist.

55Distinct people
68Mentions
0Explicit recommenders
4.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Open Location Code is a library to generate short codes, called "plus codes", that can be used as digital addresses where street addresses don't exist.

GitHub

Where it is used

  • Google Maps — Google Maps uses Open Location Code by making its “plus codes” searchable within Google Maps. This enables users to look up locations using plus codes in the Maps product. Source
  • Geocoding API (Google Maps Platform) — Geocoding API returns a "plus_code" field using Open Location Code to represent encoded location references. The API exposes these plus codes as a replacement for street addresses in places without conventional addresses. Source

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 7:02:50 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year68 dated mentions

Observed mentions: 2015-02-11 23:04:48 UTC to 2024-08-23 21:44:04 UTC.

0510152015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20152016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 6 mentions; 1 submissions, 5 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 17 mentions; 4 submissions, 13 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 16 mentions; 3 submissions, 13 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 13 mentions; 3 submissions, 10 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 2 mentions; 2 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC101
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC615
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC211
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC17413
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC16313
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC404
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC13310
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC220
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC514
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC202

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
Open Location Code Open Location Code is a technology that gives a way of encoding location into a form that is easier to use than latitude and longitude. The codes generated are called Plus Codes, as their distinguishing attribute is that they include a "+" character. The technology is designed to produce codes that can be used as a replacement for street addresses, especially in places where buildings aren't numbered or streets aren't named. Plus Codes represent an area, not a point. As digits are added to a code, the area shrinks, so a long code is more precise than a short code. Codes that are similar are located closer together than codes that are different. A location can be converted into a code, and this (full) code can be converted back to a location completely offline, without any data tables to lookup or online services required. Codes can be shortened for easier communication, in which case they can be used regionally or in combination with a reference location that all users of this short code need to be aware of. If the reference location is given in form of a location name, use of a geocoding service might be necessary to recover the original location. Algorithms to encode and decode full codes, shorten them relative to a reference location, and recover a location from a short code and a reference location given as latitude/longitude pair are publicly available and can be used without restriction. Geocoding services are not a part of the Open Location Code technology. Links Demonstration site Mailing list Comparison of existing location encoding systems Open Location Code definition Description Codes are made up of a sequence of digits chosen from a set of 20. The digits in the code alternate between latitude and longitude. The first four digits describe a one degree latitude by one degree longitude area, aligned on degrees. Adding two further digits to the code, reduces the area to 1/20th of a degree by 1/20th of a degree within the previous area. And so on - each pair of digits reduces the area to 1/400th of the previous area. As an example, the Parliament Buildings in Nairobi, Kenya are located at 6GCRPR6C+24. 6GCR is the area from 2°S 36°E to 1°S 37°E. PR6C+24 is a 14 by 14 meter wide area within 6GCR. A "+" character is used after eight digits, to break the code up into two parts and to distinguish codes from postal codes. There will be locations where a 10-digit code is not sufficiently precise, but refining it by a factor of 20 is i) unnecessarily precise and ii) requires extending the code by two digits. Instead, after 10 digits, the area is divided into a 4x5 grid and a single digit used to identify the grid square. A single grid refinement step reduces the area to approximately 3.5x2.8 meters. Codes can be shortened relative to a location. This reduces the number of digits that must be remembered, by using a location to identify an approximate area, and then generating the nearest matching code. Shortening a code, if possible, will drop four or more digits from the start of the code. The degree to which a code can be shortened depends on the proximity of the reference location. If the reference location is derived from a town or city name, it is dependent on the accuracy of the geocoding service. Although one service may place "Zurich" close to the Google office, another may move it by a hundred meters or more, and this could be enough to prevent the original code being recovered. Rather than a large city size feature to generate the reference location, it is better to use smaller, neighbourhood features, that will not have as much variation in their geocode results. Guidelines for shortening codes are in the wiki. Recovering shortened codes works by providing the short code and a reference location. This does not need to be the same as the location used to shorten the code, but it does need to be nearby. Shortened codes always include the "+" character so it is simple to compute the missing component. 8F+GG is missing six leading characters 6C8F+GG is missing four leading characters Example Code The subdirectories contain sample implementations and tests for different languages. Each implementation provides the following functions: Test a code to see if it is a valid sequence Test a code to see if it is a valid full code (not all valid sequences are valid full codes) Encode a latitude and longitude to a standard accuracy (14 meter by 14 meter) code Encode a latitude and longitude to a code of any length Decode a code to its coordinates: low, high and center Shorten a full code relative to a location Extend a short code relative to a location
Read the full README on GitHub

What Hacker News says

16 sources
I've liked the idea of Open Location Code for some time, so when I read the following, I thought "Surely that's not right?" > Implicit, however, is that the only way to resolve that shortened code is to make a call to the Google Maps API. I'd always thought OLC could encode/decode coordinates with a simple algorithm, with more or less precision based on the length of the code. Referring to their documentation, I found this [0]: > Supporting local codes.. If you have no map and cannot determine the device location, a local code is not sufficient and you should display a message back to the user asking them to provide a town or city name or the full global code. > ..extract the local code and send the remaining text to your geocoding service (Nominatim, Google, etc). What! I didn't know this about shortened codes - that need for an external
Read the rest
service to decode plus codes diminishes my enthusiasm for the standard considerably. Thank you for the write up, will be keeping my ears open for GeohashPhrase. --- [0] https://github.com/google/open-location-code/wiki/Supporting...
In What’s going on with WhatFreeWords?
From the article: > The 11-digit codes [...] are hard to memorise and a single mistyped digit would send a courier to the wrong address. The plus codes FAQ [1] mentions that they thought checksums weren't important for a couple of reasons: * Not needed for codes that are copy pasted rather than typed or written * Mistyped codes will be "obviously wrong" due to referring to an unrelated area I'm not too convinced by the rationale, as playing around on Google Maps shows a typo of one digit can at least sometimes produce another valid code not too far away. And even if typoed codes were always obviously wrong, it's not clear that a computer would recognize incorrect but valid codes as well as a human. [1] https://github.com/google/open-location-code/blob/master/FAQ...
In Postcode loophole enables fraudsters to hijack eBay parcels
A good explanation of this against competing standards seems to be available here [1]. It seems weird that they complain about discontinuities in such a system, where there has to be some discontinuities in a tiled system. Now, could this be used as an alternative to DNS? have a registrar per tile, and delegate if necessary. I wish this could be used as a geo: URL, or as a location field in my ical invites. I guess I need better support in various apps for it. Maybe it lack elevation information to specify meeting rooms, though? Perhaps it could be extended to support both ground and absolute elevation. Excluding words somewhat makes sense, but also removes some opportunities for artificial attractions, it isn't like some areas don't already have interesting ones [2]). So I am a bit split on this one, as it does generate longer names. May
Read the rest
be emojis would be a better fit? Now, a note about standard presentation: I would have preferred a technical overview to an introduction that merely sums up some obvious (to me) facts, without really getting into explaining the standard. Perhaps someone has already come up with a way to publish standards together with a few sliders to control the amount of content displayed? That would be great. [1]: https://github.com/google/open-location-code/wiki/Evaluation... [2]: https://www.estately.com/blog/2016/09/the-complete-list-of-l... as an example, it gets worse if you include foreign cities, regardless of the language.
In Open Location Code: An Open Source Standard for Addresses
TL;DR: see [3] for an overview of how plus codes work. ----------------- >Plus Codes have little application outside building addressing. This claim needs some arguing. >If I tell you I'm at 4CFM+JW, come get me, you're going to be pretty helpless, because I didn't include the city. So why would you tell me that? Either include the city, or use a longer plus code that includes the city. Example from the spec[1]: >>Nairobi Youth Sports Organization and Information Centre in Kibera, Nairobi, has the Open Location Code "6GCRMQPX9G". Using the location of Nairobi, the code can be shortened to "MQPX9G". >How about upping the precision? Use longer codes! It's all in the spec[1]. Again, quote: >>Using a single grid refinement step, we have an 11 digit code that represents a 1/32000° by 1/40000° area (roughly 3.4 by 2.7 meters at the equator). No
Read the rest
w, regarding this: >Want to shift a little to the east? 4CFM+JX works, but 4CFM+JY? This is by design; some symbols were omitted to avoid having words in codes (which, as TFA discusses, can be problematic, e.g. some places might not be happy with codes that have EVIL in them). >Maybe there's a way to do that, but I haven't found it yet. The spec[1] is open, and it's all in there! It is not as simple as what you expected, due to the design constraint above. But that is a tradeoff that I think is reasonable. After all, these addresses are going to be punched into a computer anyway. E.g. play with the addresses here[2]. I'm really excited to see more development in this space, because one size does not fit all. However, it's important to know what existing systems get right too. (E.g.: English W3W looks like way easier to say on the phone). Disclaimer: I work for Google/Geo, the opinions expressed here are mine, and not of my employer. [1]https://github.com/google/open-location-code/blob/master/doc... [2]https://plus.codes/map [3]https://plus.codes/howitworks
In Why Bother with What Three Words?
Here's a link to a Wiki page, in the repo for Open Location Code (prior name for Plus Codes), where they compare it against numerous location encoding systems including W3W. https://github.com/google/open-location-code/wiki/Evaluation... For W3W, they say: - The codes may be pseudo-randomly generated and so nearby places may have completely different codes. - It may be possible for multiple people to apply for codes for the same location and for different codes to be generated. - Making a mistake with a code may simply display somewhere else - for example, on What3Words, "banana rabbit monkey" is a location in Argentina, "banana monkey rabbit" is in Russia. - [It charges] money either for granting a code, for resolving codes or for allowing users to select their own short code. - [It does] not work offline and [has] a single provider. Plu
Read the rest
s Codes has respective advantages for each of these points, i.e., it's not proprietary; can be encoded/decoded offline; nearby places have similar codes; codes can be made longer for more accuracy; excludes easily confused characters; etc. Overall I found the article makes a convincing case for Plus Codes.
In Why Bother with What Three Words?

Showing the 15 most recent of 16 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.