|
Developer Utilities 100% Client-Side · 0 Bytes Sent to Server Instant In-Memory Execution

URL Query Parameters to JSON

Parse complex URL search parameters into clean JSON objects with support for repeated keys, arrays, and URI decoding.

Parsed JSON

Step-by-Step Instructions

1

Paste URL or Query String

Paste a full URL (e.g., https://example.com/api?user=1&filter=active) or a raw query string (?sort=desc&limit=25).

2

Configure Array & Type Parsing

Enable automatic parsing of repeated keys as arrays (tag=a&tag=b to ["a", "b"]) and numeric/boolean type coercion.

3

Select Output Structure

Choose between flat Key-Value JSON, nested object dot-notation (filter.date.start), or typed schema.

4

Copy Formatted JSON

Copy the structured JSON object directly into your API requests, unit tests, or backend handlers.

Key Features & Capabilities

  • Automatic URL extraction and decoding of percent-encoded parameters (%20 to spaces, %26 to &)
  • Repeated key and bracket array notation support (items[]=1&items[]=2 or items=1&items=2 to ["1", "2"])
  • Nested query parameter parsing (user[name]=John&user[age]=30 to {"user": {"name": "John", "age": 30}})
  • Type coercion converting numeric strings to numbers and 'true'/'false' to booleans

Frequently Asked Questions

How are repeated query parameter keys parsed into JSON?

When a query string contains identical keys (e.g., ?category=books&category=electronics), our parser automatically aggregates the values into a JSON array: {"category": ["books", "electronics"]}. If a key appears only once, it remains a primitive string.

How does the tool handle PHP and Rails style bracket notations (e.g., filter[status]=active)?

Our parser supports deep object reconstruction. Bracket notations like filter[status]=active&filter[sort]=date and dot-notation strings are automatically parsed into nested JSON objects: {"filter": {"status": "active", "sort": "date"}}.

Does the parser automatically decode percent-encoded characters?

Yes. All parameter keys and values are processed through standard UTF-8 URL decoding (decodeURIComponent), correctly restoring spaces, special symbols, international characters, and emojis.

Can I convert JSON back into a URL query string?

Yes. The tool features bidirectional conversion, allowing you to paste a JSON object and generate a standard, percent-encoded URL query string formatted for HTTP GET requests.

Discover complementary online tools in the same workflow.