네트워크/HTTP
Query String ↔ JSON
URL 쿼리 문자열을 JSON 객체로 분해하거나, JSON을 다시 쿼리 문자열로 조합합니다.
A URL's query string (the part after ?) is a flat set of key-value pairs, while JSON supports nested structures and data types. This tool converts between the two, including repeated keys and arrays.
How to use it
- Query → JSON: paste a query string (with or without the leading ?) to get a JSON object with decoded parameter values.
- JSON → Query: paste a JSON object to build a query string from it with correctly URL-encoded values.
- Repeated keys (a=1&a=2) are automatically recognized as an array in the JSON output.
Common uses
- Building query parameters from a JSON configuration object for an API request.
- Reading a complex query string with dozens of parameters in a structured, readable form.
- Debugging why a parameter isn't reaching the backend — checking its encoding and structure after conversion.
Things to keep in mind
Every value in a query string is text — "true", "false", or "42" stay strings in the JSON until code explicitly converts them to the right type.
Nested objects and arrays have no single standard query-string notation — different backend frameworks (PHP, Rails, Express) use slightly different syntax (a[b]=1 vs a.b=1).
자주 묻는 질문
이 도구는 ?tag=a&tag=b와 같은 반복된 매개변수 이름을 어떻게 처리하나요?
반복된 키는 일반적으로 서로 덮어쓰는 대신 배열로 수집됩니다(tag: ["a", "b"]), 이는 대부분의 백엔드 프레임워크가 쿼리 문자열을 파싱하는 방식과 일치합니다.
변환 중 특수 문자에는 어떤 일이 일어나나요?
퍼센트 인코딩된 문자(공백의 %20 등)는 JSON으로 변환할 때 원래 형태로 디코딩되고, JSON을 다시 쿼리 문자열로 변환할 때 다시 인코딩됩니다.
이 변환을 수행하기 위해 제 URL이나 데이터가 어딘가로 전송되나요?
아니요. 변환은 브라우저 내에서 완전히 이루어집니다 — 서버로 전송되는 것은 없습니다.
URL의 안전한 최대 길이는 얼마인가요?
약 2000자입니다 — 주요 브라우저와 서버 사이에서 가장 신중하게 잡은 공통 한도입니다. 더 큰 데이터양에는 쿼리 문자열 대신 본문이 있는 POST 요청을 사용하는 것이 낫습니다.
쿼리 문자열로 true/false 값이나 숫자를 전달하려면 어떻게 하나요?
쿼리 문자열은 항상 텍스트만 저장합니다 — "false"나 "42" 같은 값은 서버나 클라이언트 코드가 명시적으로 인식해 불리언이나 숫자로 변환하기 전까지는 문자열로 남아 있습니다.