URL & URLSearchParams Playground

Wulan reads a parcel label with new URL(): host, pathname, the query notes, and the hash. Which parts really reach the gudang? An interactive URL &…

Why it matters

Filters, paging, share links, OAuth callbacks: all read and write URLs. The browser’s own parser knows the rules for encoding, repeated keys, default ports and the hash; a home-made parser (split, a regex) almost always leaks at one of them.

The key idea

Let the browser read the URL

Common mistakes

Try it in this playground