Javascript UTF-8License

The encoding known today as UTF-8 was invented by Ken Thompson. UTF-8 is a variable-length character encoding for Unicode. It can represent any character in the Unicode standard, yet is backwards compatible with ASCII.

Use this Javascript to encode decode UTF-8 data. Don’t forget to set the page encoding to UTF-8 (Content-Type meta tag).

Source code for webtoolkit.utf8.js