Glossary term

WebXR

What is WebXR?

WebXR is a set of web standards developed by the W3C Immersive Web Working Group that lets browsers deliver virtual reality (VR) and augmented reality (AR) experiences on compatible headsets, phones, and computers without requiring a dedicated app.

The core of WebXR is the WebXR Device API, which provides web applications with access to compatible XR devices and their capabilities, including tracking the user's position and orientation and presenting rendered content to the device. The "X" represents different types of extended reality, including virtual, augmented, and mixed reality.

How does WebXR work?

WebXR connects a web page to compatible XR hardware and can use WebGL or WebGPU to render graphics. A typical WebXR session follows this sequence:

  1. Check support: The page checks whether the browser supports the requested WebXR session type and whether the device can provide it.
  2. Request a session: The user initiates an immersive VR or AR session, typically by clicking an Enter VR or Enter AR button. Browsers require user activation for immersive sessions.
  3. Set a reference space: The page requests a reference space that defines how positions and orientations are represented, such as relative to the user's head or the floor.
  4. Render each frame: The browser provides updated XR poses and views, and the application renders the scene for the current frame.
  5. End the session: The user exits the session, and the page returns to its normal view.

WebXR supports three session modes:

Session mode

inline

What the user sees

3D content rendered within a normal web page, without an immersive XR session

Typical Device

Desktop or phone browser

immersive-vr

What the user sees

A fully virtual environment presented through an XR device

Typical Device

Meta Quest, Apple Vision Pro, PC VR headsets

immersive-ar

What the user sees

Virtual content presented in relation to the user's physical environment

Typical Device

AR-capable phones and passthrough headsets

WebXR requires a secure context, such as HTTPS, and access to certain XR capabilities may require user permission.

What is the difference between WebXR, WebVR, and WebAR?

WebXR, WebVR, and WebAR are related but not interchangeable:

Term

WebXR

What it is

A web API standard for accessing VR and AR capabilities from compatible browsers and devices

Status

Current standard

What it is

An earlier browser API focused on VR

Status

Deprecated and replaced by WebXR

What it is

A general term for augmented reality experiences delivered through the web, rather than a single standard

Status

Can use WebXR or other web technologies

In short, WebXR replaced WebVR as the standard browser API for immersive VR and AR experiences. WebAR is a general term for AR experiences delivered through the web, which can use WebXR or other browser technologies.

What is WebXR used for?

WebXR suits experiences that should open instantly from a link:

  • Product visualization: Let shoppers place a 3D product in their room or inspect it in a headset before buying.
  • Training and education: Run immersive lessons and simulations that learners open from a course page.
  • Marketing and brand experiences: Launch VR or AR campaigns from a QR code, ad, or social post.
  • Games and interactive demos: Deliver playable VR and AR experiences directly through a supported browser without requiring a traditional app-store download.
  • Virtual tours and events: Show buildings, venues, or exhibitions to anyone with a supported browser.

What are the benefits of WebXR?

  • No install: Users can open an experience from a URL without a traditional app-store download.
  • Cross-device reach: A web-based experience can reach multiple types of supported devices from the same web deployment.
  • Instant updates: Changes go live for visitors as soon as the website is updated, without requiring users to install a new app version.
  • Easy to share: A link, QR code, or embed can make a web-based XR experience easy to access and share.

What are the challenges of WebXR?

  • Variable device and feature support: WebXR capabilities vary across browsers and devices, and features such as hand tracking, hit testing, and depth sensing are not universally available.
  • Performance constraints: Browser-based rendering can introduce performance and memory constraints that developers need to account for when building complex XR experiences.
  • Web development requirements: WebXR experiences must account for browser security requirements, permissions, device capabilities, and differences in how browsers implement XR features.

Frequently asked questions (FAQ)