Skip to content


MIT 22 2 6,615
57.5 million (month) Nov 13 2013 9.0.0(a month ago)
1,160 2 9 MIT
0.6.1(5 months ago) Dec 28 2012 8.8 million (month)

The query-string library is a Node.js library that provides a simple way to parse and stringify query strings. It is useful for working with the query string portion of a URL, which is the part of the URL that follows 'the "?" character and contains key-value pairs.

httptools is a package for parsing and modifying HTTP protocol strings which supports HTTP1.1 and HTTP2 protocol versions.

httptools is a Python binding for the nodejs HTTP parser. The package is available on PyPI: pip install httptools

Example Use

import queryString from 'query-string';

//=> '?foo=bar'

const parsed = queryString.parse(;
//=> {foo: 'bar'}

//=> '#token=bada55cafe'

const parsedHash = queryString.parse(location.hash);
//=> {token: 'bada55cafe'} = 'unicorn';
parsed.ilike = 'pizza';

const stringified = queryString.stringify(parsed);
//=> 'foo=unicorn&ilike=pizza' = stringified;
// note that `` automatically prepends a question mark
//=> '?foo=unicorn&ilike=pizza'

Alternatives / Similar