npm / query-string
query-string
What changed in query-string 5 to 10, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
15 breaking1 new APIs and options3 performance1 behavior and defaults18 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initquery-string 1026 changes
Breaking changes 10
The bracket-separator format no longer splits on a percent-encoded separator.
Node.js 22 is now required.
An option explicitly set to undefined now uses its default value.
Repeated keys are collected into an array with every arrayFormat instead of keeping only the last value.
An explicit types entry takes precedence over parseNumbers and parseBooleans, and values that do not match the type stay strings.
The string[] and number[] types always produce an array, except with arrayFormat: 'none'.
A percent-encoded byte that is not valid UTF-8 decodes to U+FFFD, like URLSearchParams, instead of being kept as-is.
Kept parameters are written back exactly as they were in the URL; parsing options change only the value the filter receives.
Throws a TypeError for values it cannot represent, such as objects, functions, symbols, and Date; use the replacer option to convert them.
Percent-encodes % in fragmentIdentifier; the fragment is now a decoded value, like query values, so it round-trips with parseUrl().
Performance 2
Decoding now runs in linear time; the old decoder was quadratic for some malformed input.
Fixes quadratic behavior for keys that repeat many times with comma and separator array formats.
Behavior and default changes 1
Parsed value types now follow parseNumbers, parseBooleans, and types options, also for parseUrl(), pick(), and exclude().
Fixes and other changes 13
Fixes stringifyUrl(), pick(), and exclude() corrupting the query and fragment identifier when encode is false.
Kept parameters are written back exactly as they were in the URL; parsing options change only the value the filter receives.
Fixes parsing with arrayFormat: 'index' when a plain value comes before indexed entries.
Fixes parseUrl() and stringifyUrl() keeping leading and trailing whitespace.
Fixes stringify() ignoring the replacer result when skipNull or skipEmptyString is used.
Fixes sort handling in stringify(), parse(), and pick(), including sort: true, invalid parse values, and sort: false with index arrays.
Fixes output that did not parse back to the same value, including separator characters in values and certain array cases.
No longer throws URIError for a string with a lone surrogate.
Each value is no longer read twice, avoiding getters and Proxy traps running two times.
Fixes index-format arrays already in the URL being turned into [object Object].
Fixes stringifyUrl() not accepting an interface for query.
No longer changes parameters already in the URL when parse options are provided.
Fixes parse() using types keys inherited from Object.prototype, such as toString.
query-string 95 changes
Breaking changes 1
Node.js 18 is now required to use the package.
Performance 1
Performance was improved.
Fixes and other changes 3
Fixes dropping a leading # in the fragment identifier and throwing on some absolute URLs.
Fixes handling of relative URLs with fragments.
Fixes passing an empty fragmentIdentifier to stringifyUrl().
query-string 83 changes
Breaking changes 2
Node.js 14 is now required to use the package.
The package is now pure ESM, affecting how it is imported and used in projects.
Fixes and other changes 1
Encoding of fragmentIdentifier is fixed.
query-string 72 changes
Breaking changes 1
For comma and separator array modes, stringify now honors skipNull and skipEmptyString instead of behaving as though both options were true.
New APIs and options 1
Adds support for the bracket-separator array format.
query-string 61 changes
Breaking changes 1
The supported runtime target is Node.js 6 or later and the latest versions of Chrome, Firefox, and Safari; older browsers can use version 5.
query-string 51 changes
Fixes and other changes 1
A better decoder can gracefully handle many invalid query strings found in the wild; most users should be unaffected.