Online compass for your phone

Tap “Start compass”, hold your phone flat and turn around: the compass rose shows where the top edge of the phone points. Held upright, the direction of the back (camera) counts.

Works on phones and tablets with an orientation sensor. Computers usually have no compass sensor.

–

NOAA’s free calculator gives the declination for your location (enter east as positive, west as negative).

Sensor data is processed only in your browser – nothing is stored or sent.

Result

How it is calculated

How to use the online compass

  1. Open the page on your phone and tap “Start compass”. On iPhone, the browser asks for permission to use motion and orientation.
  2. Hold the phone flat: the top edge shows the direction. Held upright, the back – the camera’s viewing direction – counts.
  3. The direction appears in degrees (0° = north, 90° = east) and as a compass point.
  4. For true north, enter the declination for your location.

Magnetic or true north?

The magnetic sensor points to magnetic north. The angle between magnetic and true north is called declination; it varies from place to place and over time. NOAA’s calculator gives the current value using the World Magnetic Model. The tool calculates: true = magnetic + declination (east positive).

How the direction is calculated

Browsers report the device’s orientation as three angles (alpha, beta, gamma) according to the W3C DeviceOrientation specification. From these the tool works out where the top edge or the back points, taking screen rotation into account. On iPhone the compass heading provided by the system is used.

Limits

Frequently asked questions

Does the compass work without an app?

Yes, right in the browser. The phone needs a magnetic and orientation sensor, which most smartphones have. Computers usually lack this sensor.

Why is the compass wrong?

Metal, magnets or electrical devices nearby disturb the sensor. Remove magnetic cases, step away and recalibrate the sensor in the system settings.

What is declination?

The angle between magnetic north and true north. It depends on your location and changes slowly over time; NOAA provides a calculator.

Why does my iPhone ask for permission?

Safari only releases motion and orientation data after you agree. Tap “Allow”, otherwise the compass cannot work.

Is my data sent anywhere?

No. Sensor values are processed only in your browser. Nothing is stored and your location is not requested.

Sources and legal basis

As of:

Related tools