Qibla Finder

—

Uses your location to work out the direction, and the compass to know which way you are facing. Your location stays on your phone. Nothing is sent anywhere unless you choose to look up nearby mosques, which asks OpenStreetMap.
Finding you…
 
Qibla bearing
—
You are facing
—
Distance
—
Holding
—

This sends your approximate position to OpenStreetMap to look up mosques and street names around you. It is the only thing in this app that leaves your device, and it only happens when you tap the button below.
Or enter coordinates
Diagnostics
waiting…

What this is

A free qibla finder: it works out the direction of the Kaaba in Mecca from wherever you are, and then tells you which way to turn until you are facing it. It runs entirely in your browser — there is nothing to install, and your location is never sent to a server.

Most qibla compasses hand you a spinning needle and leave you to work out what it means. This one gives you an instruction instead: turn right 43°, then almost, then a confirmation and a short vibration when you are facing the right way.

How to use it

  1. Tap Start and allow location access.
  2. Hold the phone flat in your palm, or upright as if taking a photo — both work.
  3. Turn slowly until the banner turns green and reads Facing Qibla.

How it works

The qibla is the initial great-circle bearing from your position to the Kaaba at 21.4225°N, 39.8262°E. That part is exact: it is spherical trigonometry, not an estimate, and it needs no sensors.

Knowing which way you are facing is the harder half, and it depends on your phone's magnetometer. The app reads the device's full orientation, so the heading stays correct whether the phone is flat or upright, and it smooths the reading so a noisy compass does not make the number dance.

When the compass cannot be trusted

Magnetometers are easily disturbed by steel frames, reinforced concrete, speakers, magnetic phone cases and car dashboards. Some browsers also block motion sensors outright as a fingerprinting defence. For those cases the app offers two checks that use no sensors at all:

Common questions

Is a qibla compass accurate enough for prayer?

The calculated bearing is accurate to a fraction of a degree. The uncertainty is almost entirely in the phone's compass, which is typically good to a few degrees outdoors and can be considerably worse indoors. If the compass reading and the sun check disagree, trust the sun.

Why does my compass keep drifting?

Usually magnetic interference. Move away from metal and electronics, and wave the phone in a figure of eight a few times to recalibrate the sensor. The app warns you when readings are swinging too much to be reliable.

Does it work without an internet connection?

Once the page has loaded, yes. All the calculation happens on your device. You need a connection only to open the page the first time.

Does it track my location?

No. There is no backend and no analytics. Your coordinates are used inside your browser to compute the bearing and are never transmitted anywhere.

Which way should I hold the phone?

Either way. Held flat, the top edge of the phone points to the Kaaba. Held upright, the back of the phone does. The app detects which you are doing and tells you which applies.

Can I use a nearby mosque to find the qibla?

Only if you are close enough to see how the building is oriented. A mosque's mihrab faces the qibla, so standing in line with the building works well — but that requires being at the mosque, not merely near it. From a few streets away you cannot judge its orientation by eye, and the direction to the mosque is not the qibla unless it happens to lie that way.