… a unique hash (e.g. MD5, SHA256, etc.) of the given URL. The hash can then be encoded for display. This encoding could be base36 ([a-z ,0–9]) or base62 ([A-Z, a-z, 0–9]). If we add
/, we can use Base64 encoding. A reasonable question would be, “What should be the length of the short key? 6, 8, or 10 characters…
The Educative Team
Great reasoning, just a small question about the other allowed characters like `-`, `?`, `_`, `%`, `=` ?
Also, would you do anything differently if there was a requirement to include urls in other languages