WebXR

A web standard for accessing virtual and augmented reality hardware from the browser.

What is WebXR?

The WebXR Device API provides access to the input and output capabilities of VR and AR hardware, including head tracking, motion controllers, hand tracking, and display output, through standard web APIs. It lets a web page detect whether XR capabilities are available, query what the device supports, poll device and input state each frame, and present imagery at the appropriate frame rate.

The “X” in XR is not part of an acronym. It is used as an algebraic variable to stand in for the many forms “_____ Reality” can take: Virtual Reality, Augmented Reality, Mixed Reality, and whatever comes next. The API is designed to cover all of them without being limited to any one.

WebXR supports three broad modes of use: inline sessions, which render XR-responsive content within a normal web page (sometimes called “Magic Window” mode); immersive-vr sessions, which present content directly to a headset; and immersive-ar sessions, which overlay content on a view of the real world.

Because WebXR content is delivered over the web, a few things follow naturally from that:

Learn more in the WebXR Explainer on GitHub.

Does your device support WebXR?

The results below are generated live from your current browser. Support for individual WebXR modules means the browser can expose the feature when the underlying hardware provides it.

Checking WebXR support…

Try WebXR

To embed WebXR content in an iframe, add allow="xr-spatial-tracking" so the embedded page can access the WebXR Device API. This embed is the Input Selection sample from the Immersive Web Working Group.