Long URLs are hard to review as plain text

Campaign links and API requests often contain many parameters: utm_source, utm_medium, page, sort, filter, and more. Once the URL gets long, it becomes easy to miss typos, duplicated keys, or unexpected tracking values.

How to Convert URL Parameters to JSON for UTM and API Debugging

The URL Parameters to JSON Converter turns a URL or query string into a readable JSON object so each key and value can be reviewed clearly.

UTM Checks Before Publishing

UTM parameters affect how traffic is grouped in analytics tools. If utm_source or utm_campaign has inconsistent casing or spelling, results may split into separate campaigns. Before sharing a link, convert it to JSON and confirm the values match your naming convention.

API Request Debugging

For GET endpoints, query parameters often represent filters, pagination, sorting, and feature flags. Converting them to JSON makes the request easier to paste into docs and issues, so your team can reproduce the same conditions.

Consider reviewing a URL like this:

https://example.com/search?q=jwt&page=2&sort=updated&tag=security&tag=api

As JSON, it’s easy to see whether page is passed as a string, whether tag is specified multiple times, and whether any empty values slipped in. You can also catch a mismatch where the API expects tag=security,api but the front end sends tag=security&tag=api.

If values are percent-encoded, the URL Encoder and Decoder helps you confirm what the text means.

Writing It Up in an Issue

For bug reports, pasting the decomposed JSON alongside the expected values reproduces the problem faster than the full URL alone.

{
  "q": "jwt",
  "page": "2",
  "sort": "updated",
  "tag": ["security", "api"]
}

In this form, you can review the search term, pagination, sort order, and filter conditions separately. It reduces the burden of reading a long URL and lets reviewers focus on just the differences.

Pitfalls with encoding and array notation

When reviewing URL parameters, encoding and array notation are easy to overlook.

  • + versus %20: in a query string a space may be encoded as + (per the application/x-www-form-urlencoded specification), while the path uses %20. Both mean a space, but decoding them the wrong way leaves the + as it is.
  • Array notation differs between services: for the same “multiple values” there are tag=a&tag=b (repeated), tag=a,b (comma-separated) and tag[]=a&tag[]=b (brackets). If the front end and the API assume different ones, only one side receives the values.
  • Missing encoding: if a value contains & or = without being encoded, it is cut off there as a separate parameter.

Convert to JSON to check the shape of arrays and keys, and look at encoded values with the URL Encode / Decode tool to see their original meaning, and you will catch these mismatches early.

Actual conversion results

This is the result of entering the following URL into the URL Params to JSON tool.

https://example.com/?utm_source=news&utm_medium=email&tag=a&tag=b&q=%E6%9D%B1%E4%BA%AC&empty=&flag
{
  "utm_source": "news",
  "utm_medium": "email",
  "tag": ["a", "b"],
  "q": "東京",
  "empty": "",
  "flag": ""
}
  • Values are decoded: q=%E6%9D%B1%E4%BA%AC is shown as "東京".
  • Keys with the same name become an array: tag=a&tag=b is ["a", "b"].
  • A key with an empty value and a key with no = both become an empty string: empty= and flag aren’t distinguished.
  • Every value is a string: page=2 becomes "2", not the number 2.
  • Bracket notation such as a[]=1&a[]=2 isn’t expanded: the key stays "a[]" and the value is an array. b[x]=3 is also "b[x]": "3". If you want to read it as a nested object, compare it against how the receiving framework interprets it.
  • You can enter a whole URL, everything after the ?, or just a query part such as a=1&a=2.

Summary

URL parameters can change measurement and API behavior with a small typo. Rather than staring at a long URL, simply decomposing it into JSON improves the accuracy of your review.

Frequently Asked Questions

How are URLs with duplicate keys handled?

When the same key appears multiple times, like tag=security&tag=api, converting to JSON shows it as an array. This makes it easy to catch a mismatch where the API expects a comma-separated tag=security,api but receives multiple parameters instead. Confirm which format the spec expects.

What should I watch for with UTM parameters?

utm_source, utm_medium, and utm_campaign values become your analytics results directly. Inconsistent casing or spelling (e.g. Twitter vs. twitter) gets counted as separate campaigns. Convert to JSON before publishing to confirm the values follow your naming convention.

The values are encoded like %20 and I can’t read them.

URL parameter values are percent-encoded when they contain reserved characters. %20 is a space and %2F is a slash. Decode them with the URL Encoder and Decoder to confirm the original text.

Why is a space shown as +?

In a query string, the application/x-www-form-urlencoded specification can encode a space as +. The path part and RFC 3986 encoding use %20 instead. Both represent a space, but if you do not account for the difference when decoding, the + stays as it is, so check against the system that handles the value.