Query String is a JavaScript package for parsing, creating, and manipulating URL query strings. It converts encoded query parameters into JavaScript objects and can serialize objects back into URL-compatible strings. The library supports multiple array formats, custom separators, configurable sorting, and strict or relaxed encoding behavior. Values can optionally be parsed as numbers or booleans, while explicit type schemas provide finer control over individual parameters. Higher-level helpers can parse complete URLs, preserve fragment identifiers, and rebuild URLs with modified queries. Developers can also extract, select, or exclude particular parameters without manually processing the URL. It targets modern browsers and provides a richer feature set than native URLSearchParams for complex query handling.
Features
- Query string parsing and serialization
- Multiple array encoding formats
- Automatic number and boolean parsing
- Explicit per-parameter type schemas
- Complete URL and fragment handling
- Query parameter pick and exclude helpers