Magnetic Heading Need Location Permission
True Heading Need Location Permission
Declination: —
Latitude: Need Location Permission Longitude: Need Location Permission
Location services:
OFF
ON

Online Compass - Live and Free Compass to Find North Direction

Use this free online compass to find north and see your live direction. Get your true heading, magnetic heading and declination right in your browser.

What does this online compass do?

This compass uses the magnetometer already built into your phone to display your magnetic heading in degrees. You don't need to install any app to use it. On iPhone and iPad you tap Start compass once to begin; on Android the dial is live as soon as the page loads. Once this page has loaded, it keeps showing your heading with no internet connection for as long as you leave the tab open.

If your phone is calibrated and you take the reading away from metal, the heading is usually accurate to within about 5 to 15 degrees.

When you switch on Location services, the page obtains your coordinates (latitude and longitude) and uses the World Magnetic Model (WMM) to determine your true heading and magnetic declination. It also displays your sunrise and sunset times, plus your elevation above sea level.

This compass also lets you lock it at your intended heading, share the information displayed on the page, and change the compass color.

How do I read this online compass?

To read this online compass, follow these steps:

  1. Hold your device flat, steady and screen facing up. Tilting still works, because the accelerometer corrects for it, but flat gives the most accurate reading.
  2. Face the direction you want a bearing for.
  3. Tap Start compass (iPhone and iPad only. Android users skip to step 4). Tap the Start compass button, then tap Allow when Safari asks for Motion & Orientation access. The dial begins moving as you turn. There is nothing to set up in Settings first, and you do not need Location services for a magnetic heading. If the dial does not move, make sure Location Services is on in your iPhone settings: open the Settings app, tap Privacy & Security, select Location Services at the top of the menu, and toggle the switch so it turns green.
  4. Read the heading display. The yellow index pointer at the top of the dial is the fixed marker where you read your magnetic heading (the direction you are facing relative to magnetic north). The degree ring rotates beneath the pointer.

    Your magnetic heading is a cardinal letter and a figure from 0 to 360 degrees, measured clockwise from north: 0° / 360° means North (N), 45° means Northeast (NE), 90° means East (E), 135° means Southeast (SE), 180° means South (S), 225° means Southwest (SW), 270° means West (W), and 315° means Northwest (NW).

  5. Switch on Location services if you want more than your magnetic heading.

    Switch on Location services to look up the magnetic declination where you are standing, so your heading can be corrected from magnetic north to true north.

    Once it is on, the red index pointer appears. It marks your true heading (the direction you are facing relative to true north). The degree ring rotates beneath the pointer. The gap between your yellow and red pointers is your magnetic declination.

    It also adds your latitude and longitude, the name of the place you are in, your elevation above sea level in meters and feet, and sunrise and sunset times.

online compass

Tips for a more accurate reading

  • Remove interference: take off any magnetic case, MagSafe accessory or magnetic card wallet. These sit directly on top of the sensor and are the most common cause of a wrong reading.
  • Step away from metal: steel desks, speakers, radiators, electrical panels and the inside of any vehicle all distort the magnetic field.
  • Calibrate your compass: move your phone in a smooth figure-8 motion a few times. Calibration happens inside your phone's operating system, not on this page, so there is no calibration button here and tapping the screen does nothing. The movement is what corrects it.

What are the features of this online compass?

This compass on the onlinecompass.net website reads your phone's magnetometer and shows your magnetic heading live, in degrees and as a cardinal direction. If you switch on Location services, it adds your true heading, magnetic declination, your latitude and longitude, the location you are in now, elevation, and sunrise and sunset times. You can also lock a reading, share the gathered data, or change the compass color.

Magnetic heading

Your magnetic heading comes from your device's magnetometer rather than from your position. On Android, the dial starts on its own with no Location services needed. On iPhone and iPad, tap Start compass and allow Motion & Orientation access. Location services is not needed there either for a magnetic heading.

True heading and magnetic declination

Your phone's magnetometer can only give you magnetic north. To convert that into a true heading, the compass needs to know the magnetic declination where you are standing, and declination varies from place to place, which is why it needs your coordinates.

We calculate it ourselves. The WMM2025 coefficient file published by NOAA is built directly into our own server code, and the declination is computed entirely on our server. No external API or third-party geomagnetic service is involved, so your coordinates are never passed to anyone else.

WMM2025 is the current release of the World Magnetic Model, the standard reference for the Earth's magnetic field, valid from 2025 through 2030.

Location services

Switch Location services ON and your browser will ask permission to use your location. Allow it and the page adds:

  • your true heading, corrected from magnetic north to true north using the magnetic declination where you are standing
  • your latitude and longitude
  • the name of the place you are in
  • your elevation above sea level, in both meters and feet
  • sunrise and sunset times for where you are standing

If you decline, those fields stay empty and your heading keeps working as normal.

Lock

Lock freezes everything on screen so you can read or write down a bearing without it shifting while you look away. Tap it again to resume live readings.

One caution: do not take a bearing inside a car. A car body is a large piece of shaped steel and it pulls the reading badly off. Step outside, let the reading settle, then lock it.

online compass

Share

With Location Services off, only the magnetic heading is shared. With Location Services on, the following data are shared in a single message on apps such as WhatsApp, Telegram, or Facebook: True Direction, Magnetic Direction, Declination, Longitude, Latitude, Sunrise, Sunset, My Location, and Height above mean sea level (AMSL).

Color

By tapping the palette, you can change the compass dial color.

online compass

What devices can I use the online compass on?

A compass needs a magnetometer, a sensor that measures the Earth's magnetic field. Most phones have one. Computers almost never do.

Device Built-in Magnetometer Works here
iPhone Yes, every current model Yes, after you allow Motion & Orientation access
iPad Varies by model Usually, but worth checking
Android phone Yes, nearly all Usually
Android tablet Depends on the model Sometimes
Windows 2-in-1 or tablet Some Sometimes
Windows laptop Rarely Usually not
MacBook No No
Desktop PC No No

If you are using a laptop or desktop computer, the online compass usually will not work on these devices, because the required hardware (a built-in magnetometer) is not present in your device, and no website can make up for a missing sensor. To find out whether your device has a built-in magnetometer, check its full official specifications.

How do I enable compass permissions in Chrome and Safari?

Depending on whether you are using Chrome or Safari, follow the steps below.

Enabling sensors in Chrome (Android)

Motion sensors are switched on by default in Chrome, so the compass usually works with no setup at all. If the dial is frozen, check that the permission has not been turned off:

  1. Open Chrome and tap the three-dot menu in the top right.
  2. Tap Settings.
  3. Tap Site settings.
  4. Tap Motion sensors.
  5. Make sure it is switched on, then reload this page.
Enabling sensors in Chrome (Android)

Older guides tell you to enable a flag at chrome://flags/#enable-generic-sensor-extra-classes. That flag was removed from Chrome and no longer exists, so the address will open the Experiments page without finding anything. There is nothing to enable there.

Allowing Motion & Orientation access in Safari (iPhone and iPad)

On iOS 13 and later there is nothing to switch on in advance. Safari asks for permission on the page itself, and the request has to come from something you tap, because the compass is not allowed to start by itself:

  1. Tap Start compass on this page.
  2. Safari shows the Motion & Orientation access prompt.
  3. Tap Allow.
  4. The compass starts immediately.

If you tapped Don't Allow, reload the page and tap Start compass again.

On iOS 12.1 and earlier there is no prompt: tap Start compass once and the compass starts. On iOS 12.2 to 12.5, the compass will not start until you turn on Motion & Orientation Access in Settings > Safari > Privacy & Security, which is off by default on those versions.

That one tap is the only difference from Android.

Older guides tell you to turn on Motion & Orientation Access in Settings > Safari > Privacy & Security. That switch was removed in iOS 13, so it is not there on current iPhones and iPads. The on-page prompt replaced it.

Note that Macs have no built-in magnetometer, so they will not produce a heading. Open this page on your phone instead.

How accurate is the online compass?

Use an online phone compass for quick bearings. Carry a physical compass for anything where being 15 degrees wrong would matter.

Instrument Typical Accuracy
Sighting or mirror compass about 1° to 2°
Military lensatic compass about 2°
Baseplate compass about 2° to 5°
Phone, calibrated, away from metal about 5° to 15°
Phone near magnets or metal completely unreliable, 10° to 180° off

What are magnetic north, true north and magnetic declination?

True north is the direction toward the geographic North Pole, the point where all meridians (the imaginary lines of longitude running between the poles) converge.

Magnetic north is the horizontal direction of the Earth's magnetic field where you are standing. Your compass does not aim at the magnetic pole; it aligns with the local field lines, and those lines are bent by the geology beneath you and by the uneven shape of the field generated in the Earth's core. In contrast to true north, magnetic north shifts over time as that field changes.

Magnetic declination is the angle between magnetic north and true north (geographic north) at your specific location on Earth. It's called east declination when magnetic north lies east of true north, and west declination when it lies west.

Frequently Asked Questions

What do magnetic heading and true heading mean?

Magnetic heading is the direction you are facing, measured in degrees clockwise from local magnetic north, the direction the magnetic field points where you are standing. True heading is the direction you are facing, measured in degrees clockwise from true north.

Why doesn't my phone show magnetic heading even though I enabled compass sensor permissions?

Some smartphones lack a built-in magnetometer, such as the Samsung Galaxy A07 (4G LTE version). Make sure your phone has a built-in magnetometer.

Why do I have to tap Start compass on my iPhone?

Apple requires a permission request for motion and orientation data to come from a direct user action, so this page cannot ask as it loads. Tap Start compass, tap Allow, and the compass runs normally from then on. Android has no such requirement, which is why it starts on its own.

Why does the magnetic heading point the wrong way?

Remove any magnetic case or wallet, move away from metal, and do the figure-8 calibration. If it is still off by a constant amount, that is declination, not a fault.

Why does the reading jump around?

Interference. Magnetic mounts, speakers, steel furniture and vehicle interiors are the usual causes. Step away and recalibrate.

Why doesn't this compass work on my laptop?

Laptops and desktops almost never include a magnetometer, and MacBooks don't have one. Open this page on your phone.

Does this compass use GPS to find magnetic heading?

No. The magnetic heading comes from your device's built-in magnetometer, combined with the accelerometer to correct for tilt. GPS and other positioning signals are only used if you choose to turn on Location services for coordinates.

Does this compass show true north or magnetic north?

It can show both. By default, with Location services off, it shows magnetic heading. By switching Location services on, it shows true heading as well as magnetic heading.

Is it as accurate as a real compass?

No. A phone is typically within 5 to 15 degrees; a decent baseplate compass is within about 2. Convenience is the trade.

Do you track my location?

Sensor readings are processed in your browser and are never uploaded. If you switch on Location services, your coordinates are sent to our own server, where we calculate your true heading, magnetic declination and elevation. Sunrise and sunset times are fetched from a public API, so your coordinates are passed to that service. We do not store them.

Does this compass work offline?

You need an internet connection to load this page the first time. After that, leave the tab open and your magnetic heading keeps working offline. True heading, declination, place name, elevation and sunrise and sunset times need a connection, so they stop updating. On iPhone, tap Start compass again after a reload. Safari remembers your permission, so no new prompt appears.

What happens if I switch Location services on?

If you switch on Location services, it will show additional information such as your coordinates (latitude and longitude), the location you are in now, true heading, magnetic declination, elevation and sunrise and sunset times.