GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • MDN
  • HTML: Markup language
  • Elements
  • Global attributes
  • Attributes
  • See all…
  • Responsive images
  • HTML cheatsheet
  • Date & time formats
  • See all…
  • SVG
  • MathML
  • XML
  • CSS: Styling language

This view

  • Original page
  • New address

GeezerVison is showing developer.mozilla.org — TextDecoderStream: readable property - Web APIs | MDN

TextDecoderStream: readable property

Baseline
Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2022.

  • See full compatibility
  • Learn more

Note: This feature is available in Web Workers.

The readable read-only property of the TextDecoderStream interface returns a ReadableStream that emits decoded strings.

Value

A ReadableStream.

Examples

This example creates a TextDecoderStream that decodes UTF-8 encoded binary data. It writes some encoded binary data to the writable stream, then reads the decoded text from the readable stream.

js
const stream = new TextDecoderStream();

// Write data to be decoded
const data = Uint8Array.fromBase64("5L2g5aW95LiW55WM");
const writer = stream.writable.getWriter();
writer.write(data);
writer.close();

// Read decoded data
const reader = stream.readable.getReader();
let done = false;
let output = "";
while (!done) {
  const result = await reader.read();
  if (result.value) {
    output += result.value;
  }
  done = result.done;
}
console.log(output); // 你好世界

Specifications

Specification
Streams
# dom-generictransformstream-readable

Browser compatibility

See also

  • TransformStream.readable

Help improve MDN

Learn how to contribute

This page was last modified on Nov 26, 2025 by MDN contributors.

View this page on GitHub • Report a problem with this content
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.