Compass

Live device compass and bearing converter. View heading on mobile or convert degrees to cardinal directions.

গাইড দেখুন

গাইড

What does this tool do

The Compass tool combines a Device Compass and a Bearing Converter in one. The Device Compass uses your phone or tablet's magnetometer to show live heading (0–360° and cardinal direction). The Bearing Converter converts between degrees (0–360°) and 16 cardinal/intercardinal directions (N, NNE, NE, ENE, E, …). All runs in your browser; no server calls.

How to use it

  1. Device Compass tab — Tap "Enable compass" to grant permission. On iOS, you must allow device orientation access. Hold your device flat; the needle and heading update in real time. Works best on phones and tablets; desktop usually lacks a magnetometer.
  2. Bearing Converter tab — Choose "Degrees → Cardinal" to convert an angle (e.g. 45) to a direction (NE), or "Cardinal → Degrees" for the reverse. Enter a value or select a cardinal; the result appears instantly. Copy with one click.
  3. Switch tabs — Move between Device Compass and Bearing Converter as needed.

How it works

Device Compass: Uses the browser's deviceorientation event. On Chrome for Android, the heading comes from alpha. On Safari for iOS, the tool uses webkitCompassHeading (available after DeviceOrientationEvent.requestPermission() is granted). A fixed compass rose shows N, E, S, W; the needle rotates with the heading. Requires HTTPS and a device with orientation sensors.

Bearing Converter: Maps degrees to 16 cardinal points using 22.5° slices. 0° = N, 22.5° = NNE, 45° = NE, 90° = E, and so on. Cardinal → Degrees returns the midpoint of each slice (e.g. NNE → 22.5°). Input is validated; maximum 20 characters to avoid performance issues.

All computation runs entirely in your browser. No data is sent to any server.

Use cases & examples

  • Outdoor navigation — Check which way you're facing when hiking or orienteering.
  • Maps & GIS — Convert bearing values between numeric and cardinal formats.
  • Marine & aviation — Translate heading reports (e.g. "heading 315°" → NW).
  • Education — Teach compass directions and angle-to-bearing conversion.

Examples

Degrees → Cardinal:

  • 0 → N
  • 45 → NE
  • 90 → E
  • 180 → S
  • 315 → NW

Cardinal → Degrees:

  • N → 0°
  • NNE → 22.5°
  • NE → 45°
  • E → 90°
  • NW → 315°

Limitations & known constraints

  • Device Compass — Requires HTTPS. Desktop PCs typically lack magnetometer hardware; use the Bearing Converter tab instead. iOS 13+ requires explicit permission; the user must tap "Enable compass" to start. Some environments (e.g. iframes, restricted contexts) may block device orientation.
  • Bearing Converter — 16-point compass only (no 32-point). Input capped at 20 characters. Degrees outside 0–360 are normalized into that range.

সমস্ত হিসাব এবং রূপান্তর সম্পূর্ণভাবে আপনার ব্রাউজারে চলে। কোনো ডেটা কোনো সার্ভারে পাঠানো হয় না, তাই আপনার ইনপুট কখনো আপনার ডিভাইস ছেড়ে যায় না।