Skip to main content

JSON to Query String

Turn a JSON object into a URL query string with correct encoding and array handling.

Convert JSON objects to URL query strings with proper percent-encoding and formatting. Transform structured JSON data into URL parameters suitable for GET requests, API calls, and shareable links. Automatically handles special characters, nested objects, and arrays, producing clean, properly encoded query strings.

What is JSON to Query String?

A query string is the part of a URL that comes after the question mark (?), containing key-value pairs separated by ampersands (&). JSON to query string conversion transforms JSON objects into this URL parameter format, making it easy to include structured data in URLs for GET requests, API endpoints, and shareable links with pre-filled parameters.

Common Use Cases

  • API GET requests - convert JSON parameters to query strings for REST APIs
  • Shareable links - create URLs with pre-filled form data or parameters
  • URL generation - build URLs with dynamic query parameters from JSON data
  • Analytics tracking - convert tracking data to UTM parameters
  • Search functionality - convert search filters to URL query parameters
  • Pagination - convert page/filter data to query strings
  • Deep linking - create URLs with embedded parameters for apps

How It Works

The JSON to query string converter takes a JSON object and converts each key-value pair into URL parameter format. Keys and values are percent-encoded to handle special characters safely. Nested objects are flattened using bracket notation (e.g., user[name]=John), and arrays are handled with indexed parameters (e.g., tags[0]=web&tags[1]=dev). The output is a properly formatted query string ready to append to a base URL.

Examples

Simple object to query string

Input:
{"page":1,"limit":10,"sort":"name"}
Output:
page=1&limit=10&sort=name

Object with special characters

Input:
{"search":"hello world","filter":"active"}
Output:
search=hello%20world&filter=active

ThenCatch is a free developer toolkit. Learn more about us.