Skip to main content
Screen Diagnostics

Screen Orientation Test

Test portrait and landscape orientation, rotation angle, and screen orientation behavior in real time — directly in your browser.

Live DetectionBrowser-BasedMobile Ready
Current ModeDetecting…
Rotation Angle—
Orientation APIDetecting…

Orientation Visualization

Detecting…
Current Orientation—
Rotation Angle—
——
Rotation Angle Dial

Rotation Test

Step 1Rotate Mode
Step 2Rotate Back
Step 3Complete

Tap Start Rotation Test, then rotate your device between portrait and landscape.

Changes0
Last Detected—
Duration0s

Responsive Layout

Demonstrates how responsive UI reflows its layout mode when the viewport transitions between portrait and landscape.

Active Layout Mode—

Detection Status

StatusDetecting…
Source—

Live Diagnostics

Orientation Type—
Orientation Detail—
Rotation Angle—

Screen & Viewport

Screen Width—
Screen Height—
Viewport Width—
Viewport Height—
Available Area— × —
Device Pixel Ratio—
Color Depth—

Browser Support

Screen Orientation API—
Orientation Change Events—
Orientation Lock—
Fullscreen API—

Orientation Coverage

Modes Observed0 / 2
Coverage0%

Screen Orientation Lock

Test browser orientation locking. Most browsers require fullscreen mode or an installed mobile PWA.

Orientation History

No rotation events recorded yet.

About Orientation Detection

Every value on this page is read live from your browser — nothing is simulated. When theScreen Orientation API is present, the exact orientation type (portrait-primary, landscape-secondary…) and rotation angle come straight from it.

When that API is unavailable, we fall back to comparing viewport width and height to report Portrait or Landscape only — the exact type shows “Not available” and the angle shows “Unavailable” rather than a fabricated value. Physical tilt (face-up / face-down) is not detectable through orientation APIs.

Privacy: This tool reads display and orientation parameters directly in your browser. No orientation data is uploaded.
Compatibility: Screen orientation behavior depends on browser APIs, operating system settings, and device hardware.
Display Diagnostics

Screen Orientation Test Guide

Learn how web browsers detect portrait and landscape mode, calculate rotation angles, and enforce orientation locks.

01. What Is a Screen Orientation Test?

A screen orientation test is a diagnostic evaluation that checks whether your web browser and operating system correctly identify physical device rotations between portrait (vertical) and landscape (horizontal) viewing modes. Modern mobile devices (smartphones, tablets, and 2-in-1 laptops) contain built-in 3-axis accelerometer and gyroscope hardware that detects gravitational pull and reports orientation states to the operating system.

The browser translates these hardware sensor events into standardized W3C Screen Orientation API states, allowing websites to seamlessly reflow responsive typography, re-anchor navigation bars, and adjust layout grids.

02. How to Test Screen Orientation

  1. Ensure Auto-Rotate Is Enabled: Verify that your phone's system Portrait Orientation Lock is toggled OFF in your notification shade or Control Center.
  2. Open the Orientation Test: Tap "Start Rotation Test" in the testing card above.
  3. Hold Device Upright: Verify that the tool displays "Portrait" with an angle of 0°.
  4. Rotate Device Sideways: Turn your device 90 degrees horizontally. The visual device frame and compass needle rotate to Landscape (90°).
  5. Rotate Back: Return the phone upright to complete the two-way rotation test cycle.
  6. Review Results: The test awards a verified "PASS" banner upon confirming both states.

03. How Orientation Detection Works

Modern web browsers monitor screen orientation through the screen.orientation interface:

  • screen.orientation.type: Returns descriptive string states like portrait-primary, portrait-secondary, landscape-primary, and landscape-secondary.
  • screen.orientation.angle: Returns the rotation angle relative to the device's default orientation in degrees (0, 90, 180, or 270).
  • screen.orientation.addEventListener('change', ...): Dispatches an event instantaneously when the viewport rotates.

04. Testing Portrait & Landscape Mode

Portrait and landscape aspect ratios serve fundamentally different user interaction paradigms:

  • Portrait Mode (Height > Width): Optimal for single-handed mobile navigation, reading text, and vertical feed scrolling.
  • Landscape Mode (Width > Height): Optimal for widescreen 16:9 media playback, spreadsheets, gaming, and split-screen multitasking.

05. What Is Orientation Lock?

The Screen Orientation Lock API (screen.orientation.lock()) allows developers to request that the viewport remain locked in portrait or landscape orientation regardless of device movement. Because unconstrained orientation locks could disorient users, modern browsers enforce strict security rules:

The lock method is typically only honored when the document is in active Fullscreen mode (via the Fullscreen API) or installed as a Progressive Web App (PWA). If called from standard windowed web browsing, the browser safely rejects the promise.

06. Why Orientation May Not Change

If your screen orientation fails to update when rotating:

  • System Rotation Lock: Check whether iOS "Portrait Orientation Lock" or Android "Auto-rotate" is disabled in your quick settings.
  • Desktop Browser: Standard desktop monitors do not contain accelerometers; resize the browser window to test responsive viewport breakpoints.
  • Browser Permission Constraints: Some specialized web views or in-app browsers (e.g. inside messaging apps) disable orientation events.

Frequently Asked Questions

Common questions about screen orientation, rotation angles, and display diagnostics.

How does this online screen orientation test work?

The tool monitors the modern W3C Screen Orientation API (`screen.orientation.type` and `screen.orientation.angle`) along with window resize and orientation events in real time. When you rotate your phone or tablet, the browser reports the new aspect ratio and rotation degrees instantly.

What is the difference between portrait and landscape mode?

Portrait mode is when the display height is greater than its width (vertical orientation, typical for reading and mobile feeds). Landscape mode is when the display width is greater than its height (horizontal orientation, ideal for widescreen video and gaming).

What do orientation angles 0°, 90°, 180°, and 270° mean?

0° represents the device's default natural orientation (usually upright portrait on phones, landscape on laptops). 90° indicates the device is turned 90 degrees clockwise (landscape). 180° is upside-down portrait (rarely used on modern phones). 270° represents 90 degrees counter-clockwise (reverse landscape).

Why doesn't my orientation change when I rotate my phone?

Common causes include: 1) System Auto-Rotate Lock is enabled in your device's quick settings / Control Center, 2) The browser is restricted by the operating system, 3) You are using a desktop browser without physical accelerometer/gyroscope sensors, or 4) The device's internal orientation sensors need recalibration.

Can I test screen orientation on a desktop computer?

Yes. While standard desktop monitors lack physical rotation sensors, you can test responsive viewport orientation by resizing your browser window so its width is narrower than its height, which triggers portrait layout modes.

What is the Screen Orientation Lock API?

The Screen Orientation Lock API (`screen.orientation.lock()`) allows web applications to programmatically lock the display into a specific orientation. Most mobile browsers only allow orientation locking when the webpage is in Fullscreen mode or running as an installed Progressive Web App (PWA).

Why does Orientation Lock show an error when clicked?

Web standards enforce strict security restrictions on screen orientation locking to prevent malicious websites from disorienting users. Browsers reject lock requests unless the user is in full-screen mode or has granted specific web app permissions.

What is the difference between screen dimensions and viewport dimensions?

Screen dimensions represent the total physical resolution of the display in CSS pixels. Viewport dimensions represent the usable inner window area available to web content, excluding browser address bars, bottom navigation bars, and tabs.

Does this test upload my device rotation data?

No. All orientation calculations, angles, rotation events, and tests run 100% locally within your device's browser memory. No orientation or telemetry data is ever sent to any remote server.

What does Device Pixel Ratio (DPR) mean?

DPR is the ratio between physical hardware pixels and logical CSS pixels. High-density screens (such as Apple Retina displays or 1440p mobile OLEDs) typically have a DPR between 2.0 and 3.5, enabling ultra-sharp text and graphics.

How does the Rotation Test determine a PASS result?

The test requires you to physically rotate your device from its starting orientation to the opposite mode and then return back. Only when both portrait and landscape orientation transitions are actually observed will the test award a 'PASS' status.

Does this test support tablets and foldable phones?

Yes. Tablets (such as iPads and Galaxy Tabs) and foldable smartphones are fully supported. The tool accurately tracks transitions when folding, unfolding, or rotating between primary and secondary aspect ratios.

What is portrait-primary vs portrait-secondary?

Portrait-primary is standard upright portrait mode. Portrait-secondary represents the display turned 180 degrees upside down. Similarly, landscape-primary is standard 90° clockwise landscape, and landscape-secondary is 270° counter-clockwise.

Why does the rotation compass needle move?

The circular compass dial displays the current orientation angle (0°, 90°, 180°, 270°). The needle smoothly rotates in real time to match your physical device's rotation angle relative to its natural upright position.

Can web pages detect if a phone is placed face down?

Standard screen orientation APIs only detect 2D screen aspect rotation. Detecting if a phone is face-down on a table requires the DeviceOrientation / Gyroscope API (measuring Beta and Gamma tilt angles), which is available on our dedicated Mobile Device Test tool.

How fast should the orientation test update?

The test updates instantly upon receiving the browser's `change` event. Modern mobile operating systems typically apply a small 100–250ms hardware debounce to prevent accidental rotation triggers while walking.

Does fullscreen mode help orientation testing?

Yes. Entering fullscreen mode removes browser navigation toolbars and system URL bars, providing the maximum possible canvas and enabling orientation lock support on compatible Android browsers.

What browsers support the Screen Orientation API?

The W3C Screen Orientation API is supported across Google Chrome, Apple Safari (iOS 16.4+), Mozilla Firefox, Microsoft Edge, and Samsung Internet.

Can a damaged gyroscope cause orientation test failures?

Yes. If your phone's internal accelerometer or gyroscope chip has suffered physical shock, water damage, or calibration drift, the operating system may fail to dispatch rotation events.

Can I clear the rotation event history?

Yes. Click the 'Clear History' button in the Orientation History card to reset the list of recorded rotation timestamps and angles.