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, 6:01:08 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

17 sources
This is an interesting alphabet, even Base58 (Bitcoin addresses) have "o" and "1". There's some information on how they generated it here in the spec[1]. The characters that are used in Open Location Codes were chosen by computing all possible 20 character combinations from 0-9A-Z and scoring them on how well they spell 10,000 words from over 30 languages. This was to avoid, as far as possible, Open Location Codes being generated that included recognisable words. The selected 20 character set is made up of "23456789CFGHJMPQRVWX". [1]: https://github.com/google/open-location-code/blob/master/doc...
In Open Location Code
Another neat encoding is the base-20 character set that Open Location Codes ("plus codes") use: > The characters that are used in Open Location Codes were chosen by computing all possible 20 character combinations from 0-9A-Z and scoring them on how well they spell 10,000 words from over 30 languages. This was to avoid, as far as possible, Open Location Codes being generated that included recognisable words. The selected 20 character set is made up of "23456789CFGHJMPQRVWX". https://github.com/google/open-location-code/blob/master/doc...
In Base58
I like the idea of a universal addressing system but I don't think we've found the solution yet to this extremely difficult problem. Street addressing is nice because the addresses with the same street name are on the same street organized by number. (generally at least--there are example of streets that stop/restart) And the numbering is collinear with the direction of travel. i.e. I walk along the street. And I know I'll pass 11XY to get to 12XY. what3words was interesting but the words for the squares don't seem to be related to each other. From one square, I'd like to be able to generate the addresses of all the adjacent squares. (///jumped.spring.improving directly next to ///book.groups.hiking) and I can't generalize a larger square of w3w squares with an overarching set of words or something playing around with the plus codes, they
Read the rest
seem to increment in a consistent way but I haven't figured out how e.g. (a random example) W->E: _+HJV _+HJW _+HJX _+HMR N->S: _+HMJ _+HMC _+HM6 _+HM2 I also like that I can change the address reference box size based on how many letters I have after the plus sign. In case I want to reference my front door versus my entire city. It'd be much easier filling out addresses in forms because I could type less info. But it'd be hard for me to associate a string on number letters to an area just in everyday life. Market St or Powell st carries more with it. And is streets aren't directly aligned with the boxes then that poses a difficulty. Edit: found their doc evaluating other methods [link](https://github.com/google/open-location-code/wiki/Evaluation...)
In Plus codes: addresses for everyone
Looking at the FAQ (https://github.com/google/open-location-code/wiki/Evaluation...), it appears that Plus Codes are very similar to the Maidenhead codes, except in these respects: - Maidenhead codes contain vowels, which the Plus code designers didn't want to use in order to avoid having codes spell words (which might have negative associations or be profane). - The addition of the "+" character is felt to make it easier to autodetect addresses when provided to Google Maps or similar systems.
In Google Maps has found a better way to navigate India’s chaotic roads
They're private, proprietary, and online (it can decode regular three word combos offline, but the one word special locations need web access). Switching the order of words results in totally different locations. Google gave the example of "banana rabbit monkey" being in Argentina, "banana monkey rabbit" in Russia [0]. And while it's localized to more languages than just English, the friction when exchanging location data across language barriers seems problematic. For example, giving an English speaker something like "пропан.зачет.некий." in an image, spoken, or written on paper would be totally opaque and hard to even enter with a US keyboard, let alone commit to memory. [0] https://github.com/google/open-location-code/wiki/Evaluation...
In Google Maps has found a better way to navigate India’s chaotic roads
According to their evaluation [1]: "Maidenhead Locator System codes explicitly represent areas, and can be truncated in a similar way to Open Location Codes. The accuracy and length of the codes is similar, but Maidenhead Locator System codes include vowels and so the generated codes include words" "Maidenhead Locator System codes are based on an interleaving of latitude and longitude, and so are truncatable, and nearby locations have similar codes. It is only formally defined to a length of 8 characters." This suggests (when compared with their 'desired attributes' [2]) that their innovation over it is increased precision, and a different symbol alphabet to reduce profanity. [1] https://github.com/google/open-location-code/wiki/Evaluation... [2] https://github.com/google/open-location-code/wiki/Evaluation...
In Open Location Code: Easier location encoding
Additional info: [1] https://plus.codes/developers - Plus codes are based on Open Location Code (OLC, for short), an open-source project initiated by a group of Google engineers. [2] https://github.com/google/open-location-code/blob/master/doc... - Definition document - Open Location Code: An Open Source Standard for Addresses, Independent of Building Numbers And Street Names [3] https://github.com/google/open-location-code - Github repo [4] https://plus.codes/howitworks - How it works
In Open Location Code: Easier location encoding

Showing the 15 most recent of 17 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.