This only makes sense if your metric is number of code points.  You don&#x27;t actually get better density with this.<p>Base64, encoded as either ASCII or UTF-8, stores 6 bits per byte; making it 75% efficient.<p>Base65536 encoded as UTF-8 (by far the most common) will split its characters about evenly between 3-byte and 4-byte encodings (it uses code points up to 165376 roughly evenly distributed [1]).  That is 16 bits per 3.5 bytes, or 57% efficient.  Much worse.<p>UTF-16 (what Javascript uses) is slightly better; you get a distribution about even between 2 and 4 bytes.  That is 16 bits per 3 bytes, or 67% efficient.  Better, but not as good as Base64 in ASCII or UTF-8.  (However, it <i>is</i> better than Base64 in UTF-16, which is only 37.5% efficient.)<p>Stick with Base64 unless you&#x27;re strictly counting code points (like tweets do).<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;ferno&#x2F;base65536&#x2F;blob&#x2F;master&#x2F;get-block-start.json" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ferno&#x2F;base65536&#x2F;blob&#x2F;master&#x2F;get-block-sta...</a>