JSON to Query String Converter
Paste a flat JSON object to get its URL query string.
Result
How it is calculated
The input must be valid JSON describing one flat object, with double-quoted keys and strings. Each property becomes key=value, in the order written, and the pairs are joined with &. Both key and value go through percent-encoding in the style of RFC 3986: letters, digits and - _ . ~ stay as they are, everything else becomes %XX. A space therefore becomes %20 (not +), and accented letters become their UTF-8 bytes, for example é as %C3%A9.
Values are turned into text first: true and false become those words, null becomes an empty value, and numbers are printed in JSON form, so 9.50 becomes 9.5. Nested objects or arrays, a top-level list, an empty object or invalid JSON give no result. The leading ? is not added. The tool also reports the number of pairs and the longest key.
Worked example
Input: {"q":"red shoes & socks","page":2,"sale":true,"tag":null,"price":9.50}. The value of q has spaces and an ampersand, so it becomes red%20shoes%20%26%20socks. page is 2, sale is true, tag is null and gives an empty value, and price 9.50 becomes 9.5. The result is q=red%20shoes%20%26%20socks&page=2&sale=true&tag=&price=9.5 with 5 parameters; the longest key is price.
Common mistakes
- Pasting a nested object or an array value such as {"ids":[1,2]}. The tool needs a flat object and returns nothing; you must decide yourself whether to write ids=1,2 or ids[]=1&ids[]=2, which servers read differently.
- Using single quotes or unquoted keys, as in JavaScript. Only strict JSON with double quotes is accepted.
- Expecting a plus sign for spaces. Spaces become %20, which is correct in a URL path and in nearly all query strings, but a server expecting form encoding may show the %20 literally in rare cases.
- Encoding the full result a second time before adding it to a link. It is already percent-encoded, and encoding it again turns % into %25.
- Expecting null to disappear or numbers to keep their trailing zeros. null gives an empty value (tag=), and 9.50 is shown as 9.5.
About this calculator
A URL query string is the part after the “?” that passes key-value data to a web server, formatted as key=value pairs joined by “&” with special characters percent-encoded so they survive transmission safely. This tool takes a flat JSON object — one level deep, no nested objects or arrays — and converts each property into a properly percent-encoded key=value pair, joining them into a ready-to-use query string.
The conversion is a routine step for web developers and API integrators building or debugging HTTP GET requests, constructing shareable deep links, or converting a JSON config or form-state object into URL parameters for analytics tracking, redirect URLs or webhook callbacks. It saves the manual, error-prone work of percent-encoding each value by hand and remembering which characters (spaces, ampersands, equals signs) need escaping in a query string.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
The pairs come out in the order you wrote them. If you are signing a request or building cache keys, sort the keys yourself before pasting, because many signature schemes expect a fixed order. The tool also leaves off the leading question mark, so add it when you append the string to a URL. Does your API want plus signs for spaces or bracketed array names? Tell us which style you would like supported.