Complete User Guide to Device Sensors, Accelerometer, Gyroscope & Orientation APIs

How Accelerometers, Gyroscopes, and Orientation Angles Work in Browsers

Smartphones, tablets, and certain hybrid laptops contain Micro-Electro-Mechanical Systems (MEMS) motion sensors that web pages can read through the DeviceMotion and DeviceOrientation browser APIs when served over a secure context and permitted by the browser. An accelerometer measures acceleration in meters per second squared (m/s²) along three axes (X left-to-right across the screen, Y bottom-to-top along the screen, and Z perpendicular out of the screen)—including Earth's gravity (~9.81 m/s²) when resting flat or upright. A gyroscope measures angular rotation rate (α, β, γ in degrees per second) around those axes, while orientation reports device rotation and tilt angles (alpha, beta front-to-back tilt, and gamma left-to-right roll). A browser-based Device Sensor Inspector reads sensor frames 100% locally in your browser—with zero server uploads.

How to Inspect Your Device Sensors in 3 Easy Steps

  1. Open on a Sensor-Equipped Device & Tap Enable Sensors: Tap Enable Sensors (required on iOS Safari and certain browsers to request motion/orientation permission), or click Simulate Tilt Preview on a desktop browser to test the live bubble and readout pipeline.
  2. Tilt or Rotate Your Device Gently: Watch the bubble indicator, gravity acceleration (m/s²), gyroscope rotation rate, and orientation angles respond in real time.
  3. Pause or Export Your Sensor Snapshot: Click Pause to freeze a reading, then export via Copy Sensor Snapshot or Download .txt.

Acceleration Magnitude & Gravity Reference Formula

Combining three-axis acceleration components (ax, ay, az) gives total acceleration magnitude:

Total Acceleration (|a|) = sqrt(ax² + ay² + az²)  |  1 g ≈ 9.81 m/s²

Helpful Tips When Testing Sensors on Mobile & Desktop

Worked Example: A smartphone resting face-up flat on a table experiences roughly 0 m/s² on X and Y and about +9.81 m/s² (~1.00 g) along the vertical Z axis due to Earth's gravity.

Device Sensor Axes, Orientation Angles & Reference Table (16 Rows)

Use this reference table to understand accelerometer axes, gyroscope rates, and orientation angles.

Sensor Axis / Metric API Property Unit / Range Notes
Accel X (Left / Right) accelerationIncludingGravity.x m/s² Positive right across screen plane
Accel Y (Bottom / Top) accelerationIncludingGravity.y m/s² Positive up along screen plane
Accel Z (Out of Screen) accelerationIncludingGravity.z m/s² ~9.81 m/s² when flat face-up
Linear Acceleration acceleration.x/y/z m/s² (gravity removed) Measures active motion without 1g
Gyro Alpha (Z-Axis Spin) rotationRate.alpha deg/s Yaw / flat spin angular velocity
Gyro Beta (X-Axis Tilt) rotationRate.beta deg/s Front-to-back pitch angular velocity
Gyro Gamma (Y-Axis Roll) rotationRate.gamma deg/s Left-to-right roll angular velocity
Orientation Alpha DeviceOrientationEvent.alpha 0° – 360° Compass / Z-axis rotation angle
Orientation Beta DeviceOrientationEvent.beta −180° – 180° Front-back tilt (0° when flat)
Orientation Gamma DeviceOrientationEvent.gamma −90° – 90° Left-right tilt (0° when flat)
iOS Permission Prompt DeviceMotionEvent.requestPermission() User gesture required Triggered by Enable Sensors button
Simulate Tilt Preview Local synthetic tilt animation Desktop / UI verification Toggleable in studio top bar
Client-Side Engine Browser devicemotion & deviceorientation Listener — Zero Server Latency
Server Uploads None — Sensor telemetry is never transmitted to any server
Privacy Status 100% Local Processing — Zero motion streams stored externally
No Sign-Up Required Instant browser sensor check with zero registration

Checking battery status, testing your webcam or screen resolution, or inspecting browser signals? Explore our companion client-side tools:

Frequently Asked Questions

Most desktop PCs and standard laptops do not include hardware accelerometers or gyroscopes—open this page on a smartphone or tablet with motion sensors, or click Simulate Tilt Preview to test the live bubble and readouts.
iOS Safari requires a direct user tap gesture to call DeviceMotionEvent.requestPermission() and DeviceOrientationEvent.requestPermission() before delivering live motion and orientation values.
Never. All sensor listeners, bubble rendering, and snapshot exports run 100% client-side inside your browser.
Yes! It is completely free with no sign-up required.