How many characters are in this string?

Sometime I just need to know the length of a string. Enter a string in the box below to return the length of a given string. You can use the following code sample to write your own version.

JS code sample

var str = document.getElementById('InputString');
str.addEventListener('keyup', function(){
  document.getElementById('StringLength').innerHTML = str.value.length;
  document.getElementById('Results').style.display = 'inline';
This utility uses only front end JavaScript no data is sent to the server.