> For the complete documentation index, see [llms.txt](https://docs.webtonative.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.webtonative.com/javascript-apis/load-in-external-browser.md).

# External Browser API

Open links in the device’s default browser using the WebToNative JavaScript API. Control external URL handling in your mobile app.

To load in external or mobile default browser.

You need to append "loadIn=defaultBrowser" in query parameter of the url you are trying to load.

```
<a href="https://www.example.com?loadIn=defaultBrowser">Load In Browser</a>
or 
window.location.href = "https://www.example.com?loadIn=defaultBrowser";
```

\*It works for both Android and iOS.

The below function is supported in Android and you'll need to import the javascript file in your website before starting from this [link](/javascript-apis/getting-started.md).

{% tabs %}
{% tab title="Plain Javascript" %}

```
WTN.openUrlInBrowser("https://www.webtonative.com"); 
//pass the url you want to open in the external browser.
```

{% endtab %}

{% tab title="npm" %}

```
import { openUrlInBrowser } from "webtonative";

openUrlInBrowser("https://www.webtonative.com");
//pass the url you want to open in the external browser.
```

{% endtab %}
{% endtabs %}
