This compass reads your phone's magnetometer and shows the direction you are facing as a heading in degrees (0° north, 90° east) and as a direction such as South-west. Lock holds the reading so you can note it down.
It works on phones and tablets whose browser shares a compass heading: Safari on iPhone and iPad, and Chrome on most Android phones. Laptops and desktop computers have no compass, so on a computer this page can only explain that.
On a computer: laptops and desktops have no compass, so the Compass tab says "No compass here". Open this page on your phone. The ruler and protractor work on a computer.
A compass points to magnetic north, which is a few degrees away from true (map) north in most places. The difference is the magnetic declination. Tap Magnetic to switch to true north, and set your local declination in Settings: you can look it up from your national mapping agency or NOAA's declination calculator.
Does the online compass work on a laptop?
No. Laptops and desktop computers have no magnetometer, so there is no heading for a web page to read. Open the page on a phone or tablet.
Why is my phone compass wrong?
Nearby metal and magnets bend the reading: steel tables, cars, speakers, laptops and magnetic phone cases. Move away from them and wave the phone in a figure of 8 to recalibrate it.
Is it accurate enough for hiking?
It is fine for a rough direction. For navigation where it matters, carry a proper baseplate compass and a map: a phone can lose battery or be thrown off by metal nearby.