Web Development
web
url
http
What is Query String?
Definition
A query string is the part of a URL after the question mark (?). It contains key-value pairs separated by ampersands (&) — for example, ?page=2&sort=name. Query strings pass parameters to the server without changing the URL path.
Why It Matters
Query strings are used for search parameters, pagination, filtering, tracking codes (UTM), and API parameters. Understanding proper encoding of query strings prevents bugs with special characters and ensures correct server-side parsing.