#url Clear
Tags #utils #browser #performance #array #async #dom #objects #pattern #events #format #concurrency #http #ui #advanced #fetch #url #string #functional #cache #files #crypto #promise #intl #observer
JavaScript Slugify String
Converts any string into a URL-safe slug: lowercases it, replaces accented characters with ASCII equivalents, strips all non-alphanumeric characters (except hyphens), and collapses multiple hyphens into one. Ideal for generating URL slugs from blog titles, product names, or user input.
JavaScript Parse URL Query String
Parses a URL query string into a plain key-value object. Uses the built-in URLSearchParams API — no regex required. Handles duplicate keys (returns the first value), percent-encoded characters, and works with both full URLs and raw query strings. Pairs nicely with buildQueryString.
JavaScript Validate URL
Validates whether a string is a well-formed URL using the native URL constructor, which matches browser parsing behaviour exactly. Optionally restricts to specific protocols (defaults to http and https). No regex maintenance required — if the browser can parse it as a URL, this returns true.