</>PackageGraphPackageGraph

query-string

npmv9.5.1TypeScript

Parse and stringify URL query strings

Safe to adopt

Yes — query-string scores well across adoption, maintenance, weight, supply chain, and licensing. 22.1M downloads per week and 3 known dependents. Last published 8 days ago. 11 releases in the last 2 years.

  • AAdoption: grade A, Excellent.

    22.1M downloads per week and 3 known dependents.

  • AMaintenance: grade A, Excellent.

    Last published 8 days ago. 11 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Pulls in 3 transitive packages, about 77 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • ALicense: grade A, Excellent.

    MIT — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding query-string to a project.

3
Direct dependencies

Runtime packages this one declares itself.

3
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

77 KB
Install size

Unpacked size of this package plus its entire runtime tree.

1
Tree depth

Longest resolved dependency chain below this package.

Licenses in the dependency tree

MIT

Every license you inherit by installing query-string, not just its own. Check this before a legal review, not after.

Compatibility

Node.js
node >=18
Module format
ESM only
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the query-string README.

import queryString from 'query-string';

console.log(location.search);
//=> '?foo=bar'

const parsed = queryString.parse(location.search);
console.log(parsed);
//=> {foo: 'bar'}

console.log(location.hash);
//=> '#token=bada55cafe'

const parsedHash = queryString.parse(location.hash);
console.log(parsedHash);
Example truncated — see the full README.

query-string vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
query-stringthis page22.1M3MIT8 days ago
qs04BSD-3-Clause1 day ago
@nodable/entities02MIT1 day ago
encodeurl133.6M5MIT1 day ago
open130.4M4MIT1 day ago
html-escaper79.8M1MIT1 day ago

Dependencies

Declared by query-string v9.5.1. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (6)

ava ^6.1.1benchmark ^2.1.4deep-equal ^2.2.3fast-check ^3.15.1tsd ^0.30.7xo ^0.57.0

Used by

Popular packages that depend on query-string.

Relationship graph

Dependencies (left) and dependents (right) of query-string.

Frequently installed together

Release history

10 releases in the last two years, typically about 26 days apart.

Recent versions of query-string
VersionPublishedSizeLicense
9.5.1latest8 days ago58 KBMIT
9.5.01 month ago58 KBMIT
9.4.12 months ago58 KBMIT
9.4.03 months ago58 KBMIT
9.3.111 months ago56 KBMIT
9.3.01 year ago55 KBMIT
9.2.21 year ago52 KBMIT
9.2.11 year ago52 KBMIT
9.2.01 year ago52 KBMIT
9.1.21 year ago50 KBMIT
9.1.11 year ago50 KBMIT
9.1.02 years ago51 KBMIT
9.0.02 years ago45 KBMIT
8.2.02 years ago45 KBMIT
8.1.03 years ago45 KBMIT

Overview

query-string is an npm package that parse and stringify URL query strings. It is extremely widely used, with about 22.1M downloads per week and 3 known dependents in the graph. The latest version is 9.5.1, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need parse and stringify URL query strings and value a battle-tested, widely-adopted solution.

When not to use it

Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.

Pros

  • Large, well-established user base (22.1M weekly downloads).
  • Ships TypeScript type definitions.
  • Clear open-source license (MIT).

Cons

  • No significant drawbacks detected from available metadata.

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Funding

Frequently asked questions

Should I use query-string?

Yes — query-string scores well across adoption, maintenance, weight, supply chain, and licensing. 22.1M downloads per week and 3 known dependents. Last published 8 days ago. 11 releases in the last 2 years.

How do I install query-string?

Run `npm install query-string` to add query-string to your npm project.

How many dependencies does query-string have?

query-string declares 9 direct dependencies and pulls in 3 packages in total once its runtime tree is resolved totalling about 77 KB on disk.

What license is query-string released under?

query-string is distributed under the MIT license.

How popular is query-string?

query-string has approximately 22,114,781 downloads per week and 3 known dependent packages.

Is query-string still maintained?

The most recent release of query-string (v9.5.1) was published 8 days ago.

Does query-string run install scripts?

No. query-string does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.