Skip to content
Yunedia Tools

Compass

A compass using your device's orientation sensor, with degrees and cardinal direction. Phones may need a permission tap and calibration.

How to use

  1. Open this page on a phone or tablet that has a compass sensor.
  2. Press Start compass and, if asked, allow motion sensor access.
  3. Hold the device level; the heading in degrees and the cardinal direction are shown.

Notes

The heading comes from your device's magnetometer via DeviceOrientation events. It is relative to magnetic north; the difference from true north (declination) is not corrected. Accuracy depends heavily on the device and nearby magnetic interference from magnets, metal and electronics. For navigation or any use where accuracy matters, use a dedicated compass. Desktop computers usually have no sensor, in which case the page says so instead of showing a fake dial.

FAQ

The heading seems wrong
Wave the device slowly in a figure-8 to calibrate, and move away from magnets and metal. Magnetic phone cases are a common cause.
What happens on a desktop computer?
There is no sensor, so no orientation events arrive and the page explains that. The dial never moves on its own.