---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---
# TextEncoder()

The **`TextEncoder()`** constructor returns a newly created `TextEncoder` object that will generate a byte stream with UTF-8 encoding.

## Syntax

```js
new TextEncoder()
```

### Parameters

None.
