The Domain Name System, which performs a lookup service to translate
user-friendly names into network addresses for locating Internet
resources, is restricted in practice1 to the use of ASCII
characters, a practical limitation that initially set the standard for
acceptable domain names.
(see: https://en.wikipedia.org/wiki/Internationalized_domain_name)
As the article tells, domains we use everyday, are technically limited to ASCII characters, to support more characters unicode domains gets encoded into so called Punycode
(see RFC: https://www.ietf.org/rfc/rfc3492.txt)
Visting a website with an umlaut (or similar) will force the browser to encode this. For example, http://öbb.at is transformed to http://xn--bb-eka.at. The transformed form is called ASCII Compatible Encoding (ACE) made up of the four character prefix ( xn-- ) and the punycode representation of Unicode characters. See more details here ...
To parse it back, you could look into:
Punycode JS on GitHub
Solution from some - StackOverflow