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.
How it is calculated
How to use the online compass
- Open the page on your phone and tap “Start compass”. On iPhone, the browser asks for permission to use motion and orientation.
- Hold the phone flat: the top edge shows the direction. Held upright, the back – the camera’s viewing direction – counts.
- The direction appears in degrees (0° = north, 90° = east) and as a compass point.
- 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
- Phone compasses are not calibrated like a hiking compass. Metal, magnets, magnetic phone cases and electrical devices can deflect them noticeably.
- If the direction is wrong, recalibrating the sensor in the system settings or moving the phone in a figure eight often helps.
- For navigation outdoors or in emergencies, use a real compass and a map.
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
- W3C – DeviceOrientation Event Specification
- MDN Web Docs – DeviceOrientationEvent
- MDN Web Docs – DeviceOrientationEvent.requestPermission() (iOS)
- NOAA NCEI – Magnetic Field Calculators (declination)
- NOAA NCEI – World Magnetic Model
- Wikipedia: Magnetic declination
As of:
Related tools
- Spirit level for your phoneOnline spirit level: place your phone on a surface or hold it against an edge and read the tilt in degrees and percent. With zero calibration, no app needed.
- Show my GPS coordinatesFind your GPS coordinates: shows your location in decimal degrees, degrees/minutes/seconds, decimal minutes and UTM, ready to copy – or convert coordinates.
- Altimeter: how high am I?Online altimeter: shows your phone’s GPS altitude with accuracy, average, minimum and maximum, in metres or feet, with a note on ellipsoid vs. sea level.
- Online protractorOnline protractor: measure an angle on your screen with three points, or get your phone’s tilt angle from its sensor, in degrees and percent. No app needed.
- Classroom noise meter traffic lightNoise traffic light in your browser: the microphone measures loudness and the light turns green, yellow or red. Adjustable thresholds, full screen. Free.
- CPS Test: How Many Clicks Per Second Can You Do?Free CPS test: measure your clicks per second over 1, 5, 10 or 60 seconds and track your best score per duration. Works with mouse, touchpad and touch.