Skip to main content
patrache.diagno

Is My Digital Compass Working?

Start the test and rotate your device horizontally. A Canvas compass needle points north in real time, with heading displayed in degrees and cardinal direction (N, NE, E, SE, S, SW, W, NW).

This test reads the DeviceOrientationEvent.alpha property from the magnetometer to display a real-time compass heading in degrees (0–360°) with cardinal direction labels.

0° points north, 90° east, 180° south, 270° west; accuracy depends on magnetic interference and device calibration.

Sensor access is required to run this test.

Embed

Embed this tool

What Do Your Results Mean?

ResultRangeMeaning
GoodHeading updates smoothly, matches physical directionYour magnetometer is calibrated and working correctly. The compass needle tracks north accurately as you rotate.
WarningHeading drifts or jumps erraticallyMagnetic interference from metal objects, phone cases, or nearby electronics. Move away from interference sources and calibrate by moving the phone in a figure-8 pattern.
BadNo heading data or value stays fixedThe magnetometer is not available or permission was denied. On iOS, grant orientation sensor access when prompted.

Common Issues and How to Fix Them

Compass shows wrong direction or drifts

Calibrate the magnetometer by slowly waving your phone in a figure-8 motion several times. Move away from metal objects, magnets, and electronic devices.

No heading data appears on iOS

iOS 13+ requires explicit permission for DeviceOrientationEvent. Tap Start to trigger the prompt and grant access. Ensure the site is served over HTTPS.

Frequently Asked Questions

How do I test my phone's digital compass?

Tap Start Test, then hold your phone flat and rotate it slowly. The compass needle should point north. The heading display shows your current bearing in degrees (0-360) and cardinal direction.

Why is my compass showing the wrong direction?

Magnetic interference from metal objects, cases, or nearby electronics can affect accuracy. Try moving away from such objects. Some devices may need compass calibration — move your phone in a figure-8 pattern.

Does this test use GPS or location data?

No. The compass test uses only the DeviceOrientation API to read the magnetometer. No GPS, location services, or network requests are involved.

Is any data sent to a server?

No. All orientation data is processed locally via the DeviceOrientation API. No server communication occurs during the test.

Powered by Patrache Studio Diagno

Please allow ads on this site

To use these tools, allow ads on this site. Advertising keeps this service free.

Open your ad blocker, turn off blocking for this site, then check again.