Turn your phone into a compass — see the magnetic heading in degrees and the cardinal direction in real time.
This digital compass reads the magnetometer sensor in your device through the browser's DeviceOrientation API. It shows the magnetic heading in degrees (0° = north, 90° = east, 180° = south, 270° = west) and the cardinal or intercardinal direction name. The reading updates in real time as you rotate the device.
The compass works on most phones and tablets because they have a built-in magnetometer — the same sensor that lets the map app rotate. On a desktop computer without a magnetometer, the sensor is simply not available and the tool says so. On iOS, the browser must ask for explicit permission to access the sensor, which is why a button appears first.
Accuracy depends on the device, calibration and environment. A magnetometer measures the Earth's magnetic field, which is about 25-65 microtesla and easily disturbed by nearby magnets, metal objects, speakers, wireless chargers and even the phone case. If the heading jumps or seems wrong, move away from electronics and wave the phone in a figure-eight pattern — that is the calibration gesture most phones recognise.
Because desktop computers rarely have a magnetometer. The compass needs a hardware sensor that measures the magnetic field.
Magnetic north — the direction the sensor detects. The difference between magnetic and true north is the magnetic declination, which varies by location and year.
Electromagnetic interference from nearby objects. Move away from computers, speakers, metal furniture and magnets. Wave the phone in a figure-eight to recalibrate.
No. The sensor data stays in your browser and is not sent to any server.
Vai.la turns any URL into a short link with click statistics, QR Code and your own biolink.
Vai.la is not responsible for how the tools are used or for decisions made based on their results.