How to use a digital compass on your phone
Your phone already has a compass built in. This guide covers how to unlock it in the browser, how to get a reliable reading, and what to do when the reading misbehaves.
Short version: open the compass, tap Enable Compass, grant motion access, then hold your phone flat and read the heading under the dial. If the reading drifts, tap Calibrate.
Step 1 — Grant motion access
Browsers do not let a website read your phone's magnetometer without asking. The first time you open the compass you will see an Enable Compass button. Tapping it asks the browser for permission — this has to be a real tap, which is why the compass never starts on its own.
- iPhone / iPad: Safari shows a "Motion & Orientation Access" prompt. Tap Allow. If you dismissed it, go to Settings → Safari → Motion & Orientation Access and turn it on, then reload.
- Android / Chrome: Chrome grants sensor access automatically over HTTPS. If the page is served over plain HTTP the sensor is blocked entirely — that is a browser security rule, not a bug in the compass.
- Desktop: most laptops have no magnetometer. The compass will tell you so rather than display a fake heading, and you can run a preview animation instead.
Step 2 — Hold the phone correctly
A compass measures the direction the top of your phone is pointing while it lies flat. That means:
- Hold the phone level, screen facing up. Tilting it introduces error.
- The direction you face is the direction the top edge points — not the side, and not the direction the screen is tilted.
- Hold it away from your body. Your own body, a bag, and a car door all carry metal that bends the magnetic field.
Step 3 — Read and lock a bearing
The large letter and number in the centre of the dial is your heading — the compass direction you are facing, measured clockwise from north. North is 0°, east is 90°, south is 180°, west is 270°.
Tap Lock to freeze the current heading as a target bearing. From then on the readout shows your deviation — how many degrees off you are, and whether to turn left or right. This is the mode you want when following a trail bearing, steering a boat, or lining up a landmark. Tap Unlock to go back to a free-running compass.
Magnetic north vs true north
Your phone's magnetometer points at magnetic north — the direction a compass needle physically swings to. Maps, however, are drawn against true north, the geographic North Pole.
The gap between the two is called magnetic declination, and it depends on where you are on Earth. It is close to zero along a wandering line through the Americas, and grows to 20° or more in parts of Canada, Alaska and the South Atlantic.
If you are walking to a landmark, magnetic north is fine. If you are taking a bearing off a paper map or a nautical chart, you need true north — and that means applying your local declination by hand. The compass does not do it for you, because correcting to true north requires knowing where you are and this compass never asks for your location.
When the compass asks for attention
There is no confidence percentage to interpret. The compass stays quiet while the reading is good, and speaks up when it is not:
| What you see | What it means |
|---|---|
| Nothing highlighted | Readings are trustworthy. Good to navigate by. |
| Calibrate lights up | Something is interfering, or the sensor has drifted. Calibrate. |
| The dial jumps or spins | Do not rely on the number until you recalibrate. |
Calibrating your phone compass
Phone magnetometers drift. The fix is simple and works the same on every platform:
- Hold the phone away from computers, speakers, magnets and metal.
- Move it through a figure-8 pattern three or four times, rotating your wrist.
- Keep going until the guide under the dial fills and reads Done.
The compass does the counting for you: tap Calibrate under the dial and the guide tracks your motion and tells you when it has enough. It also highlights itself when a reading starts to drift.
Add it to your home screen
The compass is a progressive web app, so it can be installed without an app store. On iPhone, tap Share → Add to Home Screen. On Android, tap the menu → Add to home screen. It then opens full-screen and works offline.