Skip to content
C++ → WebAssembly → Browser

Run the real VTK in a browser tab.

The same C++ rendering and filtering pipeline that ships in desktop VTK, compiled to WebAssembly and drawn with WebGL/WebGPU. No server-side rendering, no pixel streaming, no rewrite.

0
GPU servers required
1
script tag to first render
3
languages, one runtime
index.html
<script
  src="https://unpkg.com/@kitware/vtk-wasm/vtk-umd.js"
  id="vtk-wasm"
  data-url="https://raw.githack.com/Kitware/vtk-wasm/dist/latest/vtk-wasm32-emscripten.tar.gz"
></script>

<canvas id="vtk-wasm-window" tabindex="-1"></canvas>

<script>
  vtkwasm.ready.then((vtk) => buildScene(vtk, "#vtk-wasm-window"));
</script>
renders an interactive scene, client-side
Three entry points

Pick the language you already write

Each path ends at the same WASM module. Start where your codebase already is.

How it works
  1. 01
    Reach the loader
    A script tag on the page, or an import from your bundler.
    npm i @kitware/vtk-wasm
  2. 02
    Load the runtime
    Fetches and instantiates the WASM bundle. Cached per URL.
    await loadAsync({ url })
  3. 03
    Open a session
    Standalone renders in the browser; remote mirrors a server scene.
    runtime.createStandaloneSession()
  4. 04
    Build and render
    Create VTK objects from session.vtk and bind them to a canvas.
    session.registerCanvas(...)
viewer.jsES module
import { loadAsync } from "@kitware/vtk-wasm";

const runtime = await loadAsync({
  url: "https://raw.githack.com/Kitware/vtk-wasm/dist/latest/vtk-wasm32-emscripten.tar.gz",
  rendering: "webgl", // or "webgpu"
});
const session = runtime.createStandaloneSession();
const vtk = session.vtk;

const cone = vtk.vtkConeSource();
const mapper = vtk.vtkPolyDataMapper();
await mapper.SetInputConnection(await cone.GetOutputPort());

const actor = vtk.vtkActor({ mapper });
const renderer = vtk.vtkRenderer();
await renderer.addActor(actor);

const interactor = vtk.vtkRenderWindowInteractor({ canvasSelector });
const canvasSelector = session.registerCanvas("!vtk-canvas", canvas);
const window = vtk.vtkRenderWindow({ interactor, canvasSelector });
await window.addRenderer(renderer);
await window.render();
await interactor.start();
Live demos

Running in your browser, right now

open in full screen and inspect source in dev console
Porsche
Multi-actor CAD assembly, picking
Full screen →
Procedural terrain
351k triangles built in the browser, hit Generate
Full screen →
Starfighter
Glyphs, scalar bar, interactive widgets
Full screen →
Volume rendering
531k voxels ray cast on the GPU, change transfer function preset
Full screen →
A thousand actors and more
Every object its own vtkActor, add more to test performance
Full screen →
Latest
August 09, 2026
9.7.20260809 is now available!
pip install "vtk==9.7.20260809.dev0" --extra-index-url https://wheels.vtk.org
August 02, 2026
9.7.20260802 is now available!
pip install "vtk==9.7.20260802.dev0" --extra-index-url https://wheels.vtk.org
Next
planned
Build VTK.wasm with shared library support
Targeted for the next release.
planned
Type hints (*.d.ts files)
Targeted for the next release.
shipped
Multiple interactor event loops running simultaneously in one WASM module
Released in 9.7.0.
shipped
Interactor style manipulators
Released in 9.7.0.
shipped
API to remove all observers that users added via vtkSession.Observe()
Released in 9.7.0.