All Tools
Categories
XML Tools 64 Email Marketing Tools 55 Import-Export Tools 50 JSON Tools 36 Text Tools 12 Shipping Freight Tools 5 Calculator 4 Marketing Tools 3
About Contact Privacy

Form Data to JSON

Parse HTTP form data into a JSON object in one click: bracket paths become nested structures, repeated keys become arrays, values are URL-decoded and auto-typed. All client-side.

Form Data Input
Waiting for input
JSON Output
Bracket paths rebuild nesting: user[name] becomes {"user":{"name":...}}, items[0] becomes an array, and repeated keys or empty brackets a[] append values to arrays.

About Form Data to JSON

HTTP request bodies from HTML forms arrive as a flat stream of percent-encoded key=value pairs — user%5Bname%5D=Ada&port=5432. Reading them is miserable: the nesting is hidden in bracket syntax, the encoding hides the real characters, and repeated keys mean arrays you have to reconstruct yourself.

Convert Form Data to JSON parses urlencoded bodies and readable key=value lines into a proper JSON object. Bracket paths rebuild nested objects and arrays, values are URL-decoded, repeated keys become arrays, and optional auto-typing restores numbers and booleans.

Features

  • Both encodings accepted: URL-encoded bodies and plain key=value lines, split on & or newlines.
  • Bracket-path parsing: user[name], items[0][name], items[] all become proper JSON structures.
  • Repeated keys become arrays: a=1&a=2 yields {"a":["1","2"]}.
  • URL decoding: Spaces, &, =, % and Unicode are restored from percent-encoding.
  • Optional auto-typing: true, false, null and numbers become native JSON values.
  • Defensive parsing: Invalid escapes and malformed pairs never crash the result.
  • Pretty output: The result is formatted, readable JSON.
  • Private: All processing happens in your browser; nothing is uploaded.

How to Use

  1. Paste the form data — urlencoded body or key=value lines.
  2. Toggle auto-typing if values should become booleans and numbers.
  3. Review the live output — bracket paths and arrays are rebuilt automatically.
  4. Copy or download the JSON object.

Examples

Example 1 — Webhook debugging. A developer captures a form-encoded webhook body from server logs and converts it to JSON to inspect the payload structure without decoding percent-escapes by hand.

Example 2 — Integration tests. A QA engineer converts expected form submissions into JSON assertions, with bracket paths and repeated keys preserved exactly as the server sees them.

Example 3 — Framework migration. A team moving from PHP to a JSON API parses existing $_POST dumps through the tool to build equivalent JSON request fixtures.

Example 4 — Troubleshooting forms. A support engineer takes a raw browser request body from devtools, converts it, and sends the readable JSON to the fix team.

Benefits

  • Readable output: Flat encoded pairs become nested, structured JSON.
  • Framework-accurate: Repeated keys and bracket paths match server-side parsing behavior.
  • Typed values: Numbers and booleans stay native when you want them.
  • Zero data movement: The body is parsed locally and never uploaded.
  • Instant results: Live output updates with every keystroke.

Frequently Asked Questions

What input does it accept?
Both URL-encoded bodies (user[name]=Ada&port=5432) and readable key=value lines (user[name]=Ada on its own line). Pairs are split on & or newlines, keys and values are URL-decoded, and bracket paths are parsed into nesting.
How do bracket paths become JSON?
user[name]=Ada becomes {"user":{"name":"Ada"}} and items[0][name]=x becomes {"items":[{"name":"x"}]}. Numeric brackets produce arrays; empty brackets append to an array; named brackets build objects.
What happens with repeated keys?
Later values are appended: a=1&a=2 becomes {"a":["1","2"]}, and a[]=1&a[]=2 becomes {"a":["1","2"]} too. This matches how most server frameworks collect repeated form fields.
Are values auto-typed?
With auto-typing on, the strings true, false, null, integers and decimals become booleans, null and numbers. Turn it off to keep every value as a string, which is how raw form parsing behaves.
Can malformed pairs break the result?
Lines without a = sign are ignored, and invalid percent-escapes (%zz) are kept as literal text instead of throwing. The parser is defensive so a bad pair does not destroy the rest of the document.
Is my form data uploaded anywhere?
No. Conversion happens entirely in your browser. Nothing is uploaded, stored or logged.