Advertisement
Streams
TextEncoder Demonstration
Encode JavaScript UTF-8 text strings into Uint8Array binary buffers.
Checking support...
Feature Not SupportedThis browser does not support the TextEncoder Web API feature. Try testing in a modern browser (such as Chrome, Edge, Safari, or Firefox).
Advertisement
Interactive Input Workspace
Ready for input
Web API Execution Output
Result output will be displayed here after execution...
Native JavaScript Code Example (Zero Libraries)
const encoder = new TextEncoder();
const bytes = encoder.encode('Hello World');About the TextEncoder Web API
TextEncoder takes a stream of code points as input and emits a stream of UTF-8 bytes.
Specification:W3C & WHATWG Web API Standard
Sponsored Content