base64

Published on 12 June 2017
This post thumbnail

Long URLs often get wrapped and become non-clickable in some email clients.

I prefer short URLs, including using base64 for embedded codes:

a-z26 lowercase letters
A-Z26 uppercase letters
0-910 numeric digits
- and _hyphen and underscore

Using the above base64 character set, we can now encode 16 million values using only 4 characters (e.g., 5tY6), or 68 billion values using only 6 characters (e.g., 5tY6_q).

See also these flight results, and code in Java and PHP.

And geo64 is Python code to map geo lat/lon coordinates to base64 URLs.