TextDecoder.encoding

The TextDecoder.encoding read-only property returns a string containing the name of the decoding algorithm used by the specific decoder.

It can be one of the following values:

Value

A string.

Specifications

Specification
Encoding
# ref-for-dom-textdecoder-encoding①

Browser compatibility

BCD tables only load in the browser

See also