Form Data to JSON Converter
Paste a form-urlencoded string to convert it into JSON.
Result
How it is calculated
The string is split on & into pairs, and each pair is split at its first = into key and value. Both are percent-decoded with standard URL decoding, so + and %20 become spaces and %25 becomes %. A leading ? is ignored, empty pairs and pairs with an empty key are skipped, and a key with no = gets an empty string as its value. If a key appears again, its values are collected into an array in the order they appear. Every value stays text: age=30 gives the string 30, not a number. The result is pretty-printed JSON, and the count is the number of distinct keys.
Worked example
Input: name=Ada+Lovelace&city=London&tag=a&tag=b¬e=100%25+sure. There are five pairs. name decodes to Ada Lovelace (the plus becomes a space), city to London. tag appears twice, so it becomes the array [a, b]. note decodes to 100% sure. Five pairs but only four distinct keys, so the tool reports a key count of 4 and prints an object with name, city, tag and note.
Common mistakes
- Expecting numbers or booleans: every value is output as a string, so
age=30becomes the text 30 and you must convert types yourself. - Pasting a full URL instead of just the query part. Everything before the
?is not stripped, so the first key would include the address; paste only what follows the?. - Assuming repeated keys overwrite each other. Here they become an array, which differs from servers that keep only the last value.
- Forgetting that a literal plus sign must be sent as
%2B; a bare+is read as a space. - Expecting bracket names like
user[name]to become nested objects. They stay as flat keys with the brackets included.
About this calculator
HTML forms and many APIs submit data as application/x-www-form-urlencoded text — key-value pairs joined with &, keys and values separated by =, and special characters percent-encoded (spaces as + or %20). That flat, order-dependent string is easy for browsers to send but awkward to read or reuse compared to structured JSON, especially once repeated keys like item=1&item=2 need to become arrays.
This tool parses a form-urlencoded string, decodes each key and value, and outputs clean, formatted JSON. Backend developers use it to quickly inspect what a form POST body or query string actually contains, and QA engineers and API testers use it when converting a captured request (from browser dev tools or a proxy like Postman) into a JSON payload for a different endpoint or test fixture.
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)
Everything comes out as text, and repeated keys become arrays. Pasting a=1&a=2&b&c=%E2%82%AC gives a as the list 1, 2, b as an empty string, c as the euro sign, and a key count of 3. If your code expects a number or a boolean, convert it afterwards. Which odd encodings or nested key styles have tripped up your parsing?