Digital Compass
Free online digital compass using your phone's magnetometer. Read the magnetic heading, record a session with min/max/jitter stats and export CSV or JSON.
Digital Compass - Online Magnetometer Heading Tester
The Digital Compass is a free, browser-based tool that reads your device's built-in magnetometer through the Web DeviceOrientation API to determine magnetic north and display your current heading in real-time.
Built for QA labs and repair technicians as well as everyday navigation, it records every heading sample while running and shows live session statistics — minimum, maximum, circular-mean average, and peak-to-peak jitter — so you can immediately see whether a magnetometer is stable, noisy, or stuck. The full session can be exported as CSV or JSON and attached to a pass/fail test record.
Useful for:
• Magnetometer / orientation-sensor bring-up and QA testing
• Navigation and wayfinding while traveling
• Hiking, mountaineering, and trekking
• Camping and outdoor activities
• Construction alignment and feng shui
• Geography and science education
No app installation needed, works directly in the browser. All sensor data stays on your device — nothing is uploaded.
Key Features
- Real-time magnetic heading display (0-360°) read directly from the device magnetometer
- Visual compass rose with 8 cardinal directions: N, NE, E, SE, S, SW, W, NW
- Shortest-path needle rotation so the rose never spins the long way at the 0/360 boundary
- Live session recorder: every heading sample is captured while running
- Session statistics — min, max, circular-mean average, and peak-to-peak jitter
- Export the recorded session as CSV or JSON for test reports
- Detailed degree markings every 5° with major marks every 30°
- Fullscreen mode for convenient outdoor use
- Honest feature detection: clear message on desktop, insecure (HTTP) context, or when no sensor data arrives
- Multi-language support (English, Spanish, Vietnamese, Portuguese, French)
- Compatible with most smartphones and tablets that expose a magnetometer to the browser
Tips for Most Accurate Results
- Keep your device flat and parallel to the ground (not tilted) — tilt couples into heading error
- Move away from electronics (computers, speakers, TVs), large metal objects and magnets
- If the heading is jumpy or wrong, calibrate by rotating the device in a figure-8 motion in the air
- Note: magnetic north differs from true geographic north (declination can vary 0-20° by location); this tool reports magnetic heading
- Record a short session and check the jitter value — a low peak-to-peak spread indicates a stable sensor
- Remove magnetic interference sources like bracelets or magnetic watches before use
- On iOS 13+, remember to grant 'Motion & Orientation' permission when requested
- Accuracy depends on your device's magnetometer sensor quality

