Current URL Use window.location.href to get current URL. const currentUrl = _ => window.location.href; // currentUrl() -> 'https://google.com'