Query String Formatter

Serialize an object into a URL-encoded query string with percent-encoded keys and values.

Description

Percent-encode an object's keys and scalar representations into a URL query string.

Query String Formatter percent-encode an object's keys and scalar representations into a URL query string.

Use this to construct deterministic key=value pairs for simple links, API examples, and tests from an already prepared parameter object.

When to use Query String Formatter

Use this to construct deterministic key=value pairs for simple links, API examples, and tests from an already prepared parameter object.

How it works

Each key and String-converted value is encoded with encodeURIComponent, joined by equals signs, and separated with ampersands in object-entry order.1

Interpreting the result

Keep the input units, direction conventions, encoding, and ordering rules visible when reusing the result. Preserve the full returned value for downstream calculations and round only for presentation.

Assumptions and limitations

Nested objects, arrays, null handling, repeated keys, plus-as-space conventions, and canonical sorting vary between APIs. This tool does not add a leading question mark.

References

  1. RFC 3986: Uniform Resource Identifier (URI): Generic Syntax — RFC Editor

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies