Parse and stringify URL query strings
6.9k
Stars
452
Forks
2
Open issues
30
Contributors
AI Analysis
query-string is a mature, well-adopted npm package for parsing and stringifying URL query strings in JavaScript. It handles multiple array format conventions and serves developers building web applications or libraries that need flexible query string manipulation beyond the native URLSearchParams API. It benefits frontend and Node.js developers who require advanced parsing options.
Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.
AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.
query-string: a mature, configurable query string parser for JavaScript with broad ecosystem presence
query-string solves the practical problem of reliably parsing and stringifying URL query strings in JavaScript, including edge cases like arrays in multiple formats, type coercion, sorting, and custom separators. It targets JavaScript/Node.js developers who need more control than the native URLSearchParams API provides. With ~6,900 stars, 452 forks, and consistent npm download figures in the hundreds of millions annually, it is one of the most widely installed query string utilities in the npm ecosystem. It remains actively maintained by Sindre Sorhus as of mid-2026.
Created in November 2013, it predates native URLSearchParams support in browsers and Node.js by several years, establishing itself as the default choice for query string handling. It has evolved through multiple major versions, adding ESM-only support and new features like typed parsing.
Growth was driven primarily by ecosystem inertia — it became an indirect dependency of many popular tools and frameworks early on. Its weekly npm downloads consistently rank in the top 1% of packages. Star growth has plateaued (1 star in the past 7 days), reflecting a mature, utility-stage project where adoption is measured in downloads rather than new GitHub stars.
npm download counts for query-string have historically exceeded 50-100 million downloads per week, placing it among the most widely consumed npm packages. It appears as a transitive dependency in many popular JavaScript toolchains. Direct production usage at scale is strongly implied by download volume, though individual production deployments are not individually documented.
Appears to be a focused, single-purpose utility library exporting parse and stringify functions. Likely implemented as a pure ESM module (Sindre Sorhus migrated most packages to ESM-only around 2021-2022). The API surface is deliberately narrow but highly configurable via an options object, supporting multiple array serialization formats, type coercion, custom sorting, and per-key type schemas.
Not documented in README, but based on the project's maturity, sindresorhus's general practices, and the complexity of edge cases covered in the documented API, testing is likely comprehensive — though this cannot be verified from metadata alone.
Last push was 2026-05-29, approximately 27 days before the evaluation date. This indicates active maintenance. The project is under Sindre Sorhus's stewardship, who has a documented track record of maintaining packages long-term. No signs of abandonment.
ADOPT IF: you need fine-grained control over array serialization formats, type coercion, or custom separators in query strings, and URLSearchParams falls short of your requirements. AVOID IF: your use case is simple key-value parsing — native URLSearchParams handles this without adding a dependency, and the README itself recommends that path. MONITOR IF: you depend on it as a transitive dependency in an ESM migration context, since its ESM-only nature can create issues in CommonJS-based toolchains.
Independent dimensions
Mainstream potential
3/10
Technical importance
6/10
Adoption evidence
8/10
- ESM-only design (post v7) creates friction for CommonJS or older toolchain environments, potentially forcing version pinning or workarounds.
- Native URLSearchParams continues to improve and may absorb more use cases over time, gradually narrowing the feature gap that justifies this dependency.
- Single-maintainer project: Sindre Sorhus is prolific but manages hundreds of packages; bus factor risk exists even if current maintenance is good.
- The library appears to have plateaued in star growth, which may indicate the JavaScript community is increasingly defaulting to native APIs for new projects.
- Downstream breakage risk: because it is a transitive dependency for many packages, major version changes (like the ESM-only shift) have historically caused ecosystem disruption.
Likely to remain a stable, maintained utility for the foreseeable future, slowly losing new adoption to native URLSearchParams in simple cases while retaining strong presence as an indirect dependency in existing codebases.
Explore similar
Newsletter
Get analyses like this every Monday
Free weekly digest of the most interesting open-source discoveries.
Languages
Information
- Language
- JavaScript
- License
- MIT
- Last updated
- 2w ago
- Created
- 154mo ago
- Analyzed with
- anthropic/claude-haiku-4-5
Stars over time
Contributors over time
Top 100 contributors only — repos with more will plateau at 100.
Top contributors
Recent releases
Similar repos
google/go-querystring
go-querystring is a Go library that encodes structs into URL query strings,...
| Repository | Stars | Week Δ | Language | Score | Updated |
|---|---|---|---|---|---|
|
|
6.9k | +6 | JavaScript | 8/10 | 2w ago |
|
|
8.9k | — | JavaScript | 8/10 | 1w ago |
|
|
2.1k | — | Go | 8/10 | 4d ago |
|
|
14.9k | — | TypeScript | 8/10 | 4d ago |
|
|
10.7k | — | TypeScript | 8/10 | 2d ago |
|
|
17k | — | TypeScript | 9/10 | 4d ago |
The native browser/Node.js API handles simple cases without a dependency. query-string differentiates itself with array format options, sorting, type coercion, and more nuanced parsing behaviors. The README itself recommends URLSearchParams for simple use cases, suggesting the library is positioning itself for complex needs only.
qs (8,941 stars) is the closest functional competitor, popular in Express.js ecosystems. qs supports nested objects via bracket notation more deeply; query-string focuses more on explicit array format flexibility and ESM-first design. Both are mature and widely used; choice often depends on framework conventions.
nuqs (10,601 stars) targets a completely different use case: type-safe URL state management in React/Next.js. It operates at a higher abstraction level. Not a direct substitute for query-string's low-level parsing utility.
ky is an HTTP client, not a query string parser. Listed as a similar repo likely because of shared authorship and common usage in frontend projects, but it solves a different problem.
A Go library for encoding structs into query strings — entirely different language and use case. Not a meaningful competitor in the JavaScript ecosystem.