Skip to main content

Query strings

If user input and other information is to be transmitted from a website to a server, there are various possibilities.

One possibility are so-called query strings.

What are query strings?

A query string is a sequence of parameter value pairs attached to a URL by a Web browser or other application.


A query string is always separated from the rest of the URL by a question mark (?). The string contains at least one key value pair (parameter value pair).

If several pairs of values are appended, the individual pairs are again separated from each other by the commercial “and” (&). The assignment of a value to a parameter is done by inserting an equals sign (=). For example, a URL with an appended query string has the following appearance

Application examples for query strings

Originally, query strings were used to transmit user input into a form on a web page to the server so that the data could be entered into a database, for example. In this case, a separate parameter value pair is appended to the URL for each individual form field. If the form contains fields that cannot be seen or changed by the user, these fields are still inserted into the query string and transmitted.

Query strings can also be used to track the movements of visitors on a web page. Once the user loads the web page, we append a unique string to the URL for that session and pass it to each subpage when the visitor clicks on a link. In this way, the user’s movement can be tracked and evaluated across the various pages of a domain.


By loading the video, you agree to YouTube’s privacy policy.
Learn more

Load video

Further links:

Do you have any more questions?

Please contact us

Further contents