Formateador de JSON
Formatea JSON con sangría legible.
Formateador de JSON
Type or paste to update the result automatically.
Your result appears here
Type, paste, or use an example. Copy your result when it is ready.
Cómo usar Formateador de JSON
JSON formatter takes strict JSON and returns the same data with readable line breaks and indentation. You can set 1 to 8 indent spaces or switch to tabs, sort object keys alphabetically, and end the output with a newline. Integers beyond the exact safe range are rejected instead of being silently rounded.
- Escribe o pega tu fuente, o carga un ejemplo.
- Cambia los ajustes básicos o abre el modo avanzado para afinar el resultado.
- Revisa y copia o descarga tu resultado. Pausa los resultados en vivo para ejecutar manualmente. Las fuentes o ajustes individuales de más de 20,000 caracteres requieren una ejecución explícita.
Qué admite esta herramienta
Acepta JSON estricto. Las comas finales, comentarios, comillas simples y números no finitos no son válidos. El formato conserva los valores analizados; las claves duplicadas siguen la semántica de JSON.parse, así que solo permanece su valor final.
- Espacios de sangría
- Range: 1 to 8
- Ordenar claves alfabéticamente
- Set this value for your task.
- Terminar con un salto de línea
- Set this value for your task.
- Estilo de sangría
- Espacios · Tabulaciones
Límites y procesamiento
Las operaciones de texto aceptan generalmente hasta 2,000,000 caracteres. Los analizadores, generadores y fórmulas individuales aplican límites adicionales que muestran sus controles.
Fuente de ejemplo
{"name":"ToolCabana","count":2}Preguntas frecuentes
Can I format JSON with tabs instead of spaces?
Yes. Open Advanced mode and set Indentation style to Tabs. With Spaces selected, the Indent spaces setting accepts any whole number from 1 to 8, and the default is 2.
Does the JSON formatter accept trailing commas or comments?
No. It accepts strict JSON only, so trailing commas, comments, single quotes and nonfinite numbers produce an error that names the line and column where parsing failed.
What happens to duplicate keys when I format JSON?
Duplicate keys follow standard JSON.parse behavior, so only the last value for a repeated key remains in the formatted output. Check the source if earlier values matter to you.
¿Dónde se procesa mi entrada?
Esta operación procesa su fuente en tu navegador. Copiar y descargar son acciones explícitas; la entrada de origen no se guarda en una cuenta ni en un historial.
¿Cuáles son los límites de entrada?
Las operaciones de texto aceptan generalmente hasta 2,000,000 caracteres. Los analizadores, generadores y fórmulas individuales aplican límites adicionales que muestran sus controles.