Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since June 2022.
* Some parts of this feature may have varying levels of support.
Note: This feature is available in Web Workers.
The TransformStream interface of the Streams API represents a concrete implementation of the pipe chain transform stream concept.
It may be passed to the ReadableStream.pipeThrough() method in order to transform a stream of data from one format into another. For example, it might be used to decode (or encode) video frames, decompress data, or convert the stream from XML to JSON.
A transformation algorithm may be provided as an optional argument to the object constructor. If not supplied, data is not modified when piped through the stream.
TransformStream is a transferable object.
Creates and returns a transform stream object, optionally specifying a transformation object and queuing strategies for the streams.
The readable end of a TransformStream.
TransformStream.writable Read onlyThe writable end of a TransformStream.
None
In the following example, a transform stream passes through all chunks it receives as Uint8Array values.
This is a useful one, where multiple streams can be conjoined. Examples include building a PWA with progressive loading and progressive streaming.
Note that this is not resilient to other influences.
| Streams # ts-class |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Jul 3, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.