Real-Time GPS Compass
Uses your device's GPS and magnetometer to deliver a live, accurate compass heading updated in real time as you move or rotate.
Find your exact heading, bearing and direction in real time. Works on any device β no app, no download, just your browser.
β Location or orientation permission denied. Please allow access in your browser settings, then click "Start Compass" again.
Disclaimer: Bearing and distance calculations use the Haversine formula and are approximations. For professional navigation, always use certified equipment. All maps and location data provided by browser Geolocation API.
Start compass to record headingsβ¦
Features
More than a basic compass β a full-featured navigation toolkit in your browser.
Uses your device's GPS and magnetometer to deliver a live, accurate compass heading updated in real time as you move or rotate.
Calculate the exact bearing and great-circle distance between any two coordinate pairs using the Haversine formula. Perfect for hiking and navigation planning.
View real-time solar azimuth, sunrise direction, and sunset direction based on your current GPS location and local date/time.
Displays both true geographic north and magnetic north, with automatic magnetic declination calculated from your coordinates.
Instantly convert compass bearings between degrees, mils (military), and radians. Essential for aviation, artillery, and scientific applications.
Automatically records your heading history with timestamps so you can track direction changes during a hike, drive, or any outdoor activity.
How It Works
Click "Start Compass" and grant your browser permission to access your device's location and orientation sensors.
Hold your device flat (mobile) or face your screen. The compass rose rotates to show your real-time heading direction.
Your heading is shown in degrees and as a cardinal direction (N, NE, E, SE, S, SW, W, NW) with full GPS data.
Use the Bearing Calculator to plan routes, convert headings to mils or radians, and log your direction history.
Learn More
A compass is an instrument that determines direction relative to the Earth's magnetic poles. Traditionally a magnetized needle floating in liquid, modern digital compasses use MEMS (Micro-Electro-Mechanical Systems) magnetometers built into smartphones and tablets. Our Compass Direction Online tool leverages the Web Geolocation API and DeviceOrientation API to replicate this functionality entirely in your browser β no app installation required.
Understanding compass bearings is fundamental to navigation. A bearing is an angle measured clockwise from north, ranging from 0Β° (due north) to 360Β°. The eight primary cardinal and intercardinal directions β North, Northeast, East, Southeast, South, Southwest, West, and Northwest β divide the compass rose into 45Β° segments, giving you a practical reference for orientation in the field.
One crucial concept for accurate compass use is magnetic declination β the angular difference between true geographic north (pointing to the North Pole) and magnetic north (where compass needles point). This angle varies by location and shifts gradually over time due to changes in Earth's magnetic field. Our tool calculates and displays this declination based on your GPS coordinates.
For outdoor enthusiasts, hikers, and travelers, knowing your compass direction online provides an instant orientation check without carrying physical equipment. For professionals in surveying, aviation, or maritime navigation, our bearing calculator delivers precise great-circle calculations using the Haversine formula, which accounts for the curvature of the Earth over long distances.
Best practices for compass use include holding your device level and away from metal objects, using the heading log to track direction changes over time, cross-referencing GPS coordinates with a topographic map, and understanding the difference between magnetic and true north before navigating in unfamiliar terrain.
Whether you're planning a wilderness hike, orienting a satellite dish, finding qibla direction, or simply curious which way your window faces, this free online compass gives you instant, accurate directional data in your browser.
FAQ
An online compass uses your device's built-in magnetometer (on mobile) or GPS heading data to determine your real-time direction. It reads sensor data through the browser's DeviceOrientation API and displays it as a rotating compass needle. On desktop, it uses GPS-derived heading when available.
For full functionality including coordinates, speed, altitude, and bearing calculations, GPS access is recommended. However, on mobile devices, the compass bearing can still work using the magnetometer without GPS. Desktop devices typically use IP-based location for coordinate features.
Magnetic declination is the angle difference between true north (geographic North Pole) and magnetic north (where a compass needle points). It varies significantly by location β for example, it is positive (east) in western North America and negative (west) in eastern Europe. Our compass displays the estimated declination for your current coordinates.
On mobile devices with a magnetometer, accuracy is typically Β±2β5Β°. GPS-based heading is accurate to Β±1β2Β° when moving. Accuracy can be affected by nearby metal objects, electronic devices, or magnetic interference. For professional navigation, always use certified instruments.
Yes! Use the Bearing Calculator β enter your current location as the start point and Mecca's coordinates (21.3891Β° N, 39.8579Β° E) as the endpoint. The bearing result will give you the precise Qibla direction from your location.
Explore More
All tools. Always free. No account required.