> ## Documentation Index
> Fetch the complete documentation index at: https://ngrok.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Test Mobile Apps Locally

> Use ngrok to connect your mobile app to a local backend for testing and development without deploying.

When developing mobile apps, you need your device or emulator to reach your local backend API.
ngrok makes this simple by providing a public HTTPS URL that routes traffic to your local development server.

## How it works

1. [Install ngrok](https://ngrok.com/download)
2. Start your backend API on your development machine
3. Run `ngrok http <port>` to get a public HTTPS URL
4. Point your mobile app at the ngrok URL instead of `localhost`
5. Test your app against your local backend from any device

## Quick example

```bash theme={null}
ngrok http 8080
```

Use the HTTPS forwarding URL in your mobile app's API configuration.
Since ngrok provides a valid TLS certificate, your app works without any certificate pinning workarounds.

## Benefits for mobile development

* **Test on real devices:** Access your local server from physical phones and tablets on any network.
* **No deployment required:** Skip deploying to staging just to test a backend change.
* **HTTPS by default:** ngrok provides a valid TLS certificate, so your app's HTTPS requirements are satisfied automatically.
* **Inspect traffic:** Use the [Traffic Inspector](/guides/share-localhost/inspection) to see exactly what requests your mobile app is making and what responses it receives.

## Stable URLs

On paid plans, you can use the `--url` flag to get a consistent domain for your endpoint.
This way you don't need to update your mobile app's configuration every time you restart ngrok:

```bash theme={null}
ngrok http 8080 --url your-app.ngrok.dev
```

## Next steps

* [Quickstart](/guides/share-localhost/quickstart): get started with ngrok in minutes
* [Authentication](/guides/share-localhost/auth): add auth to your endpoint to restrict access during testing
* [Traffic inspection](/guides/share-localhost/inspection): debug requests from your mobile app
