TextDecoder converts UTF-8 encoded bytes to strings.
TextDecoder
To encode strings into bytes, use TextEncoder.