# Credentials are redacted, never shown.
format_url("https://user:[email protected]/a")
# Percent-encoded delimiters stay encoded: decoding them would fabricate
# structure that the URL does not have.
format_url("https://example.com/a%2Fb?x=a%26b%3Dc")
# An internationalized host is shown in both spellings when they differ.
format_url("https://xn--mnchen-3ya.de/p")
# Invisible and bidirectional-override code points are made visible.
format_url("https://example.com/p?q=x#%E2%80%AE%E2%80%8Bevil")
# A byte no valid UTF-8 sequence can contain is emitted, not decoded.
format_url("https://example.com/%FF%00")
# Input the WHATWG parser rejects is NA, not a guess.
format_url("example.com/x")
Run the code above in your browser using DataLab