← Blog dev

The one-liner that quietly deletes half your query parameters

Scan to open this page

The one-liner that quietly deletes half your query parameters

Before building URL Parser, we tested a few specific edge cases directly against the browser's own URL API — the same foundation most URL parser tools are built on.

A one-liner that silently drops data

Turning a parsed query string into a plain object with Object.fromEntries(url.searchParams.entries()) is a natural-looking shortcut. We ran it on ?tags=js&tags=react and got back { tags: "react" } — the first value quietly gone, no error, no warning. It's an easy trap to fall into when building a parser's output table, and this tool avoids it by iterating every entry into a list instead of collapsing into an object.

Your domain isn't what the address bar shows

We also checked what new URL('https://münchen.de/').hostname actually returns: xn--mnchen-3ya.de — the ACE/punycode form, never the readable Unicode one. A parser built directly on this API without extra work will only ever show the punycode form for an international domain. This tool decodes it back and shows both forms side by side.

Credentials in a URL don't announce themselves

A URL can carry a username and password directly — https://user:pass@host/ — and it's easy for a parser's component breakdown to just... not mention it. Since that's a real, security-relevant thing to notice (anyone who sees the URL sees the credentials), this tool flags it explicitly whenever it's present.

Try URL Parser →

#UrlParser#UrlParserQueryParamsDuplicateKeys#PunycodeIdnDomainDecoder#UrlParserUserinfoCredentials#ParseUrlOnlineNoAds