When engineering location-based applications—such as delivery dispatch systems, dating apps, transit trackers, or geofencing utilities—developers and QA testers need to simulate coordinates across different continents without physically travelling there.
Modern operating systems include dedicated Mock Location APIs designed specifically for testing. In this guide, we detail how to emulate GPS coordinates on desktop browsers, Android, and iOS, how mock location flags work under the hood, and how to verify mock fixes with our GPS Coordinates Finder.
Verify Your Emulated GPS Coordinates
Open our live GPS inspector to confirm that your browser or emulator reflects the exact latitude, longitude, and accuracy radius you configured.
1. Mocking Location in Google Chrome & Edge (DevTools Sensors)
Desktop browsers provide the fastest way to emulate custom coordinates without installing any software or mobile apps:
Open Developer Tools
Press F12 (or Cmd + Option + I on macOS) to open Chrome/Edge DevTools.
Open the Sensors Drawer
Press Cmd + Shift + P (macOS) or Ctrl + Shift + P (Windows) > Type 'Sensors' > Select 'Show Sensors'.
Select Preset or Custom Coordinates
Under Location, choose from presets (e.g. London, Tokyo, San Francisco) or select 'Other...' and enter custom Latitude and Longitude values.
2. Mock Locations on Android (Developer Options)
Android includes a native LocationManager testing subsystem:
- Enable Developer Options: Go to Settings > About Phone > Tap Build Number 7 times until you see 'You are now a developer!'.
- Install a reputable mock GPS utility (e.g., GPS Emulator or Mock Locations).
- Go to Settings > System > Developer Options > Select mock location app > Choose your testing app.
- Set your desired coordinates and start the mock broadcast.
3. Simulating GPX Routes on iOS with Xcode
Apple iOS does not have a direct user-facing toggle for mock coordinates, but developers can simulate locations using Apple's official development toolchain:
- Connect your iPhone to a Mac running Xcode.
- Create a .gpx (GPS Exchange Format) file containing waypoint coordinates, elevation, and timestamps.
- In the Xcode Debug menu, select Simulate Location and choose your GPX waypoint file or route track.
4. How Apps Detect Mock Locations Under the Hood
To prevent fraud in banking, gaming, and ride-hailing apps, mobile operating systems expose programmatic flags that inform applications when a mock location provider is active:
- Android: Location.isFromMockProvider() (API 18+) or Location.isMock() (API 31+) returns true if the position was generated by a testing provider.
- iOS: Comparison between cellular network timing and GPS timestamps identifies synthetic coordinates.
Convert Target Test Coordinates
Convert GPS test waypoints between Decimal Degrees (DD), Degrees-Minutes-Seconds (DMS), and Universal Transverse Mercator (UTM).