# sindresorhus/query-string

Parse and stringify URL query strings

Repository: https://github.com/sindresorhus/query-string
Canonical: https://ross.abutalabs.com/products/query-string
Language: JavaScript
License: MIT
License Family: permissive
Topics: query-string, urlsearchparams, url, stringify, parse, npm-package
Last push: 2026-08-06T17:05:34+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 96, release rhythm 84, longevity 100
- inputs: {"age_days": 4676, "days_push": 27, "days_rel": 27, "gap_med": 31, "n_releases_24m": 10}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6903, forks 452 (observed 2026-08-28T04:09:51.208214+00:00)

## What it is
A JavaScript library for parsing and stringifying URL query strings, with support for arrays, nested objects, and various encoding formats. It is a zero-dependency npm package by sindresorhus targeting modern browsers and Node.js.

## Use cases
- parse url query strings into javascript objects
- stringify an object into a url query string
- parse arrays in query parameters with bracket or comma format
- extract query parameters from location.search or location.hash
- encode and decode url parameters safely
- build query strings for api requests

## When to choose
- you need robust query string parsing with array and object support beyond native URLSearchParams
- you want a small, zero-dependency, well-tested utility
- you need consistent handling of encoding, decoding, and custom array formats

## When to avoid
- you only need basic query string operations - the native URLSearchParams API may suffice
- you need legacy browser support, as it targets only modern Chrome, Firefox, and Safari

## Facets
- artifact type: library
- maturity: stable
- function: parser, serialization, developer-tools
- domain: web-development, frontend, developer-tools
- platform: browser
- tags: query-string, url, urlsearchparams, npm-package, stringify, zero-dependency, nodejs, javascript

## Member repositories
- sindresorhus/query-string (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:51.208214+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:41:37.661018+00:00, confidence not recorded.
  - readme: https://github.com/sindresorhus/query-string (fetched 2026-08-28T04:09:51.208214+00:00, sha 4e89faa97b6e)
  - registry_npm: https://registry.npmjs.org/query-string (fetched 2026-08-29T08:37:38.156014+00:00, sha 8d4d94dba294)
- Data as of 2026-08-30T08:39:29.467469+00:00.
