This is a simple online bit counter so you can count the bits in your string. It uses the JavaScript code from
this stack overflow answer (by
@broofa) which properly handles the subtleties of UTF-8 encoding. That code gets the number of bytes, and then it is simply multiplied by 8 to get the number of bits.