Online Compass: Digital Compass App
: Use your phone as an online compass: heading in degrees and compass points, magnetic or true north with your declination, back bearing and mils, and the turn to a bearing you set, a place from its coordinates or the QiblaOnline Compass: Digital Compass App
Use your phone as an online compass. Hold it flat or upright and the dial turns to north, with the heading in degrees and in compass points, from magnetic north or, with your declination, true north. It gives the back bearing and mils too, and it can hold a bearing for you: one you type, the direction to a place from its coordinates, or the Qibla. A digital compass in the browser, with no compass app to install.
How to use the online compass
- Open this page on a phone or tablet and tap
Start. iPhone and iPad ask for motion access first: tap Allow. A laptop or desktop has no compass sensor, so the page says so. - Hold the phone flat in front of you, top edge pointing the way you face. The line at the top of the dial is your heading: read it in degrees under the dial and in compass points (
Compass points8, 16 or 32). Held upright, the heading is where the back of the phone, its camera, points. - For true (map) north rather than magnetic north, set
NorthtoTrueand type yourDeclination, east or west, from NOAA's declination calculator (the link is beside the field). - To follow a direction, pick
Bearing to hold: a bearing you type,A place(your coordinates and the destination's, copied from a maps app) orQibla(your coordinates only). A marker appears on the dial,To face itsays which way to turn, and the dial turns green within ±5°.Hold this bearingkeeps the way you face now as the bearing to follow. Holdfreezes the reading so you can put the phone down and read it, andCopy readingcopies every figure.
Example
Readings worked out the way the compass works them out: the browser's absolute orientation (alpha 60, beta 2, gamma -1 lying flat; beta 85 held upright), then a declination, then the Qibla from typed coordinates.
Lying flat: alpha 60, beta 2, gamma -1
Held upright: alpha 60, beta 85, gamma 0
Declination 12.5 E
Your location 40.7128, -74.0060Lying flat: 300° WNW (west-northwest), back bearing 120° ESE, 5,333 mils
Held upright: 300° WNW, where the camera points
With declination 12.5 E and North on True: 313° NW
Qibla from New York (40.7128, -74.0060): 58° true, 10,306 km (6,404 mi)Details
- A phone has a magnetometer that senses the Earth's magnetic field, and the browser combines it with the phone's tilt sensors into an absolute orientation: which way the phone faces relative to north. Chrome and Samsung Internet on Android give it as an absolute orientation event; Safari on iPhone and iPad gives a compass heading after you allow motion access. This page reads whichever the browser offers and draws a compass rose that turns so its N points north.
- The heading is worked out for the way you hold the phone. Lying flat, it is where the top edge points; held up in front of you, where the back points, as the camera sees it; in between, a blend of the two that points the same way, so it does not jump as you tilt the phone. It follows the screen into landscape too. Readings are smoothed over about 0.25 s on the circle, so the needle passes from 359° to 0° without swinging round, and
Reading issays Steady once it moves less than 2° over 0.8 s. - Magnetic north is not true north. The difference, the magnetic declination, depends on where you are and drifts over the years: around 15° west in Maine, near zero along a line through the middle of the US, and around 15° east in Seattle. True heading = magnetic heading + declination, with east positive and west negative. Maps use true north, so set North to True and type your declination when you take a bearing off a map. When a declination is set, the other heading is shown as well.
- The back bearing is the heading plus or minus 180°: the way back along the line you walked, or the bearing to a landmark seen behind you. Mils divide the circle into 6,400 (NATO), so 90° is 1,600 mils; they are used with military maps and range estimation.
- A bearing to a place is the great-circle bearing: the direction you set off in on the shortest path over the Earth, worked out from both places' latitude and longitude, with the straight-line distance. It is a true bearing, turned to magnetic with your declination when North is Magnetic. The Qibla is the great-circle bearing to the Kaaba in Mecca (21.4225° N, 39.8261° E): 58° from New York and 119° from London. The page cannot find where you are by itself (it does not use location access), so type your coordinates; long-press your spot in a maps app to see them.
- The screen stays awake while the compass runs, where the browser allows it. Nothing is sent anywhere: the sensor is read in this page, coordinates are never stored, and only the settings (north, declination, points) are remembered in this browser.
Limits
- A phone compass is good to about ±5° once calibrated, and metal, magnets, speakers, a magnetic phone case or mount, a car or steel in a building can pull it off by tens of degrees. If it looks wrong, move the phone in a figure 8 a few times away from metal. Carry a real compass and a map for navigation that matters.
- Laptops and desktops have no compass sensor; the page needs a phone or tablet. Some browsers give the tilt but not a heading tied to north (the page says so), and some Android browsers turn motion sensors off for websites in their site settings.
- Close to the magnetic poles a magnetic compass is unreliable, and the declination there changes quickly from place to place.
- The page reads the sensor only while its tab is open and visible.
FAQ
How accurate is an online compass?
As accurate as the phone's sensor: about ±5° when calibrated, which is fine for finding north, orienting a map or facing a direction, but not for precise navigation. If it is off by much more, move the phone in a figure 8 and keep it away from metal and magnets, including magnetic cases and car mounts.
Does this compass show true north or magnetic north?
Magnetic north by default, as a hand compass does. Set North to True and type your magnetic declination to read true (geographic) north, the north of maps and GPS; the page shows the other heading too.
Why does the compass not work on my laptop?
Laptops and desktop computers have no magnetometer, so there is nothing to read. Open the page on a phone or tablet; the Qibla and destination bearings still work out on a laptop from typed coordinates, they just cannot be shown on a turning dial.
How do I find the Qibla direction with this compass?
Set Bearing to hold to Qibla, type your latitude and longitude, tap Start and turn until To face it says On target. The bearing is the great-circle direction to the Kaaba, for example 58° from New York; with North on Magnetic, type your declination too, since the Qibla bearing is from true north.
Is there a compass app for Android and iPhone without installing anything?
This page is one: it runs in Chrome or Samsung Internet on Android and in Safari on iPhone and iPad, with nothing to install and no account. Add it to your home screen from the browser's menu to open it like an app.
Runs entirely in your browser. Nothing is uploaded.