title: Extremely compact UUID (using all alphanumeric characters)
body: <p>I need an extremely compact UUID, the shorter the better.</p>
  <p>To that end, I wrote:</p>
  <pre><code>    public String getBase36UIID() {
          // More compact version of UUID
          String strUUID = UUID.randomUUID().toString().replace(&quot;-&quot;, &quot;&quot;);
          return new BigInteger(strUUID, 16).toString(36);
      }
  </code></pre>
  <p>By executing this code, I get, for example:</p>
  <pre><code>5luppaye6086d5wp4fqyz57xb
  </code></pre>
  <p>That's good, but it's not the best. Base 36 uses all numeric digits and lowercase letters, but does not use uppercase letters.</p>
  <p>If it were possible to use uppercase letters as separate digits from lowercase letters, it would be possible to theorize a numerical base 62, composed of these digits:</p>
  <pre><code>0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
  </code></pre>
  <p>I could theorize numerical bases also using accented characters such as &quot;è&quot; or &quot;é&quot;, or special characters such as &quot;$&quot; or &quot;!&quot;, further increasing the number of digits available.</p>
  <p>The use of these accented or special characters, however, may cause me problems, so for the moment I prefer not to consider them.</p>
  <p>After all these premises, how can I convert the BigInteger representing my UUID into the base 62 above theorized, in order to make it even more compact? Thanks</p>
  <p>I have already verified that a code like the following is not usable, because every base over 36 is treated as base 10:</p>
  <pre><code>return new BigInteger(strUUID, 16).toString(62);
  </code></pre>
  <p>After all, in mathematics there is no base 62 as I imagined it, but I suppose that in Java it can be created.</p>