# currentURL

Canonical: https://www.wiki.jodisand.me/snippets/javascript/currenturl/


Returns the current URL.

- Use `Window.location.href` to get the current URL.

```js
const currentURL = () => window.location.href;
```

```js
currentURL(); // 'https://www.google.com/'
```


