---
source: https://iinventedlight.com/library/notes/node-webstreams.md
title: "Node.js web streams - ReadableStream, WritableStream and pipeTo"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT (Node.js API docs); MIT (nodejs/node (GitHub)); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Node.js API docs, Web Streams API; nodejs/node (GitHub), doc/api/webstreams.md. MIT (https://raw.githubusercontent.com/nodejs/node/main/LICENSE). Copyright Node.js contributors."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-18
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-18
as_of: 2026-11-18
confidence: medium
untested: "Not reproduced (2026-11-18). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-web: node webstreams"
tags: [node, webstreams, readablestream, pipeto, whatwg]
client: Librarian
sources:
  - id: S1
    title: "Web Streams API"
    publisher: Node.js API docs
    url: https://nodejs.org/api/webstreams.html
    accessed: 2026-11-18
    license: "MIT"
  - id: S2
    title: "doc/api/webstreams.md"
    publisher: nodejs/node (GitHub)
    url: https://github.com/nodejs/node/blob/main/doc/api/webstreams.md
    accessed: 2026-11-18
    license: "MIT"
---
# Node.js web streams - ReadableStream, WritableStream and pipeTo
**Answer:** Node.js includes an implementation of the WHATWG Streams Standard. A ReadableStream represents a source of streaming data, and a WritableStream represents a destination for streaming data. With `pipeTo`, this ReadableStream's data will be written to a WritableStream destination.

## Examples

```js
import { ReadableStream, TextDecoderStream } from 'node:stream/web';

const readable = new ReadableStream({
  start(controller) {
    controller.enqueue(new TextEncoder().encode('hello'));
    controller.close();
  },
});

const text = await new Response(readable).text();
const reader = readable.pipeThrough(new TextDecoderStream()).getReader();
```

## Rules

- These are the same web streams used by `fetch`.
- These web streams are also what `fetch` uses.

## See also

- [node-stream](https://iinventedlight.com/library/notes/node-stream/)
- [node-buffer](https://iinventedlight.com/library/notes/node-buffer/)

## Claims

- id: C1
  claim: Node implements the WHATWG Streams Standard.
  source: S1
  evidence: "An implementation of the WHATWG Streams Standard"

- id: C2
  claim: A ReadableStream is a source of streaming data.
  source: S2
  evidence: "Represents a source of streaming data"

- id: C3
  claim: A WritableStream is a destination for streaming data.
  source: S2
  evidence: "Represents a destination for streaming data"

## Sources

- [S1] Web Streams API. Node.js API docs. https://nodejs.org/api/webstreams.html . License: MIT. Accessed 2026-11-18.

- [S2] doc/api/webstreams.md. nodejs/node (GitHub). https://github.com/nodejs/node/blob/main/doc/api/webstreams.md . License: MIT. Accessed 2026-11-18.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Node.js API docs, Web Streams API; nodejs/node (GitHub), doc/api/webstreams.md. MIT (https://raw.githubusercontent.com/nodejs/node/main/LICENSE). Copyright Node.js contributors. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
