Red/HTTP
Query String ↔ JSON
Descomponer un query string de URL en un objeto JSON, o construir un JSON de vuelta en query string.
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).
Preguntas frecuentes
¿Cómo maneja esta herramienta nombres de parámetros repetidos como ?tag=a&tag=b?
Las claves repetidas normalmente se agrupan en un array (tag: ["a", "b"]) en lugar de sobrescribirse, igual que la mayoría de los frameworks backend procesan las query strings.
¿Qué pasa con los caracteres especiales durante la conversión?
Los caracteres codificados en porcentaje (como %20 para un espacio) se decodifican a su forma literal al convertir a JSON, y se vuelven a codificar al convertir el JSON de nuevo a una query string.
¿Mi URL o datos se envían a algún sitio para realizar esta conversión?
No. La conversión ocurre enteramente en tu navegador — nada se envía a un servidor.
¿Cuál es la longitud máxima segura para una URL?
Aproximadamente 2000 caracteres — el límite común más conservador entre navegadores y servidores populares. Para cantidades mayores de datos, es mejor usar una petición POST con cuerpo en lugar de una query string.
¿Cómo se pasa un valor true/false o un número por una query string?
Una query string siempre almacena solo texto — valores como "false" o "42" siguen siendo cadenas hasta que el código del servidor o del cliente los reconoce y convierte explícitamente en un booleano o número.