What is WebXR? A plain guide to VR in the browser

By the Turbl team · · 12 min read

WebXR is a web standard that lets a web page show virtual reality (VR) and augmented reality (AR) on a headset or phone. You open a link, press a button, and you are inside a 3D scene. Nothing is installed and no app store is involved.

What WebXR is, in plain terms

A normal web page draws on a flat screen. A WebXR page can also draw to a headset and read where your head and hands are.

The core of it is the WebXR Device API. An API is a set of functions that code can call. This one is built into the browser, so a page written in JavaScript can talk to VR and AR hardware.

The API does four jobs, according to MDN, Mozilla's web documentation:

  • It finds a compatible VR or AR device.
  • It renders a 3D scene to that device at the right frame rate.
  • It can mirror the picture to a flat screen.
  • It reports the movement of controllers and other inputs.

The "X" in XR is not short for a word. The Immersive Web group describes it as a variable, like x in algebra. It stands for virtual reality, augmented reality, mixed reality and whatever comes later.

WebXR is written by two groups at the W3C, the body that standardizes the web. The Immersive Web Community Group tries out new ideas. The Immersive Web Working Group turns them into specifications. The editors of the main specification work at Google and Meta.

The specification is not finished in the formal sense. The latest version, published on 9 November 2026, is a "Candidate Recommendation Draft". That is a late stage, but not yet a final W3C Recommendation. In practice browsers have shipped WebXR for years. Chrome has supported it since version 79.

WebXR replaced an older API called WebVR. WebVR handled only virtual reality and never became a standard. It is deprecated.

How WebXR works

You rarely write raw WebXR code. Most people use a library that hides it. Still, four ideas explain everything that happens on a WebXR page.

The session

A session is the time during which the page controls the headset. There are three kinds:

Session modeWhat you seeTypical device
inlineThe 3D scene inside a normal web pageAny screen
immersive-vrA fully virtual world that replaces your surroundingsVR headset
immersive-arVirtual objects on top of the real worldPassthrough headset, AR phone

The page first asks the browser if a mode is supported. If it is, the page shows a button such as "Enter VR". The session starts only after you press it. Browsers do not let a page pull you into VR on its own.

WebXR also works only on secure pages. That means HTTPS, or localhost while you develop.

The reference space

A reference space tells the page where zero is. Every position the browser reports is measured from that point.

The most common one for standing VR is local-floor. Its origin sits at floor level where you stand, so a virtual table can be placed at real table height. bounded-floor adds the edges of your play area. viewer follows your head and is mostly used for inline scenes.

The frame loop

A headset redraws its picture many times per second. Before each redraw the browser calls the page and hands it a frame.

The frame contains the viewer pose. A pose is a position plus a direction. It also contains one view per eye. The page draws the scene once for the left eye and once for the right eye. Then it asks for the next frame. This repeats until the session ends.

WebXR does not draw anything. It only tells the page where the eyes are and takes the finished picture. The drawing is done with WebGL, the browser's 3D graphics API.

A newer graphics API, WebGPU, is starting to work inside WebXR sessions. Safari on Apple Vision Pro has supported it since Safari 26.2. Meta Quest Browser added it in version 156.0 on 13 November 2026. Most WebXR pages still use WebGL.

Input sources

Each controller or tracked hand is an input source. An input source tells the page which hand it belongs to and where it is. It also provides a pointing ray for aiming at things.

Two standard actions exist. "Select" is the main one, usually the trigger. "Squeeze" is the grip. Buttons and thumbsticks are read through a gamepad object attached to the input source.

What WebXR can do today

The core API covers VR with head and controller tracking. Extra features come as separate modules. A browser can support some modules and not others.

FeatureWhat it gives youWhere it works, as of November 2026
Immersive VRFull virtual worlds with head tracking and controller or hand inputEvery browser in the support table below
AR and passthroughYour real room behind the virtual objectsMeta Quest Browser, Chrome on Android XR, Chrome on ARCore phones
Hand trackingThe position of 25 joints in each hand, no controller neededMeta Quest Browser, Chrome on Android XR, Safari on visionOS
Plane detectionThe flat surfaces of your room, such as walls and a deskMeta Quest Browser
AnchorsA virtual object stays fixed to a real spotMeta Quest Browser, Chrome on Android XR
Hit testingFinds the real surface a ray points atMeta Quest Browser, Chrome on Android XR, Chrome on ARCore phones
Depth sensingThe distance to real objects, so they can hide virtual onesChrome on Android XR
LayersSharper text and video, drawn by the system instead of the pageMeta Quest Browser

The table lists only what the sources at the end of this article state. Other combinations may work too. Your code should ask the browser at runtime which features it has. Do not guess from the browser's name. Meta's documentation gives the same advice.

Passthrough means the headset's cameras show you your room. Meta's mixed reality page says it is in color on Quest Pro and grayscale on Quest 2. That page does not mention Quest 3 or 3S. A web page never gets the camera pixels. It draws on a transparent background, and the browser puts the camera view behind it. The guide to WebXR mixed reality, passthrough, planes and anchors covers this in detail.

Which devices and browsers support WebXR

Support follows the browser, not just the headset. This is the picture as of November 2026.

DeviceBrowserStatus
Meta Quest 2, 3, 3S and ProMeta Quest BrowserVR, passthrough AR, hands, planes, anchors, hit test, layers
Samsung Galaxy XR and other Android XR devicesChromeVR and AR, hands, hit test, anchors, depth, light estimation
Apple Vision ProSafari on visionOS 2 and laterimmersive-vr sessions and hand tracking. No immersive-ar
Windows PC with a tethered headsetChrome, EdgeVR, since version 79
Android phone with ARCoreChromeAR through the camera
Valve Steam FrameChromium 157 and laterEnabled in the SteamOS 0.5.7 beta in November 2026
iPhone and iPadSafariNot supported
Any deviceFirefoxNot supported by default

Five notes on that table.

Meta's own pages name Quest 2 and Quest Pro. UploadVR's report on the browser's hit testing covers Quest 3 and 3S.

Apple Vision Pro runs immersive-vr sessions only. An Apple engineer wrote on the Apple Developer Forums in June 2026 that immersive-ar "isn't currently supported in visionOS". So a WebXR page cannot show passthrough there. On Vision Pro you aim with your eyes and select with a pinch. WebXR calls this input mode transient-pointer.

On a PC, Chrome reaches the headset through OpenXR, and Chromium's documentation lists it for Windows only. It says Mac and Linux are not supported.

The Steam Frame entry comes from Valve's beta release note, as quoted by GamingOnLinux on 4 November 2026. The note does not say which features work. Treat it as early.

Firefox has the code behind a preference called dom.vr.webxr.enabled. It is off by default, according to caniuse.

Caniuse puts WebXR at about 78 percent of global browser use, all of it marked "partial". That number mostly reflects Chrome's market share. It counts every Chrome user, including people on laptops with no headset attached. See WebXR browser support in 2026 for the per-feature tables.

WebXR versus native apps

A native app is installed from a store and built for one platform, usually with Unity, Unreal or Godot. WebXR trades some power for reach.

What WebXR does better:

  • No install. A link is enough. The Immersive Web group's own summary is "accessed by URL".
  • Instant updates. You change the files on the server. The next visitor gets the new version.
  • One codebase. The same page can run on a standalone headset, a PC headset, an AR phone and a flat screen.
  • No store review. Nobody has to approve your project before people can open it.

What WebXR does worse:

  • Performance headroom. The page runs JavaScript inside a browser, and the browser itself uses memory and processor time. A native app talks to the hardware more directly. Large, detailed games are harder to keep at full frame rate.
  • Features arrive unevenly. Each browser picks which modules to ship. A native SDK on its own headset usually exposes new hardware features first.
  • No store shelf. A web page does not appear in a headset's store on its own. People find it through a link.
  • Gaps in coverage. iPhones and iPads cannot run WebXR in Safari at all.
  • A click to enter. Every visit starts on a flat page with an "Enter VR" button.

WebXR is not a web version of OpenXR. OpenXR is the Khronos standard that native VR apps use to talk to headsets. The two are separate APIs from different standards bodies. A browser can use OpenXR underneath to reach the hardware. Chrome on Windows does.

For a longer comparison, read WebXR vs native VR apps.

How to try WebXR in five minutes

With a headset. Open the browser on the headset. Go to the official WebXR samples at immersive-web.github.io/webxr-samples. Pick "Immersive VR Session" and press the enter button. The same site has samples for AR, hands and layers, so it doubles as a test of what your browser supports.

Without a headset. Install the Immersive Web Emulator, a free extension from Meta for Chromium desktop browsers such as Chrome and Edge. These steps are for version 2.0, current as of November 2026. Pin the extension's button to the toolbar. Open a WebXR page and click the button. The page reloads with a simulated Meta Quest and on-screen controls for the head and hands. More options are in the guide on how to test WebXR without a headset.

Write your own scene. A-Frame is a library that builds WebXR scenes from HTML tags. This is the starter example from its 1.8.0 documentation. Save it as an .html file:

<html>
  <head>
    <script src="https://aframe.io/releases/1.8.0/aframe.min.js"></script>
  </head>
  <body>
    <a-scene>
      <a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9"></a-box>
      <a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E"></a-sphere>
      <a-cylinder position="1 0.75 -3" radius="0.5" height="1.5" color="#FFC65D"></a-cylinder>
      <a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane>
      <a-sky color="#ECECEC"></a-sky>
    </a-scene>
  </body>
</html>

A-Frame sets up the renderer, the camera and the "Enter VR" button for you. To open the file on a headset, it must be served over HTTPS. Any static web host works.

A-Frame is one choice among several. three.js, Babylon.js and PlayCanvas give you more control and ask for more code. They are compared in WebXR frameworks compared.

Skip the code. AI builders can write the WebXR project for you. Turbl is one: you describe a game or a space in plain words and get a link that opens in the Meta Quest browser. It is single player only, and it produces a web link, not a store app. If you need online multiplayer or a store listing, a game engine is the better tool.

FAQ

Is WebXR free to use?

Yes. WebXR is an open W3C standard built into browsers. There is no license fee and no account. The common libraries, such as three.js, Babylon.js and A-Frame, are open source and free too. You only pay for web hosting if you publish something.

Do I need a VR headset for WebXR?

No. An inline session shows the 3D scene on a normal screen. AR sessions run in Chrome on Android phones that support ARCore. For development you can use a desktop emulator. You do need a headset to see the scene in real VR.

Does WebXR work on iPhone?

Not in Safari, as of November 2026. Safari on iPhone and iPad does not support the WebXR Device API. Among Apple devices, only Apple Vision Pro supports it by default, in Safari on visionOS 2 and later.

What is the difference between WebXR and WebVR?

WebVR was the earlier browser API. It supported only virtual reality and never became a standard. WebXR replaced it and covers both VR and AR. WebVR is deprecated, so new projects should use WebXR.

What programming language does WebXR use?

JavaScript, or TypeScript that compiles to JavaScript. The 3D picture is drawn with WebGL, or with WebGPU in the browsers that support it. Most developers do not call WebXR directly. They use a library such as three.js, Babylon.js or A-Frame that handles the session and the frame loop.

Is WebXR the same as OpenXR?

No. OpenXR is a standard from Khronos for native apps. WebXR is a W3C specification for web pages. They cover similar ground and are developed separately.

Sources

Keep reading