# Formateador de JSON

> Formatea JSON con sangría legible.

[Open tool](https://www.toolcabana.com/es/json-formatter) · [Desarrollo y datos](https://www.toolcabana.com/es/category/developer-and-data)

Tool ID: json-formatter. Requested language: es. Description language: es. Complete guide translation: yes.

## Overview (en)

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.

## Supported tasks (es)

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.

## Steps (es)

1. Escribe o pega tu fuente, o carga un ejemplo.
2. Cambia los ajustes básicos o abre el modo avanzado para afinar el resultado.
3. 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.

## Settings

- Espacios de sangría (es; key: indent; type: number); minimum: 1; maximum: 8
- Ordenar claves alfabéticamente (es; key: sortKeys; type: checkbox)
- Terminar con un salto de línea (es; key: finalNewline; type: checkbox)
- Estilo de sangría (es; key: indentStyle; type: select): Espacios [es], Tabulaciones [es]

## Limitations (es)

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.

## Example input

```text
{"name":"ToolCabana","count":2}
```

## Privacy and connections (es)

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.

## Questions (es)

### 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.

## Related tools

- [JSON validator](https://www.toolcabana.com/es/json-validator)
- [JSON minifier](https://www.toolcabana.com/es/json-minifier)
- [JSON diff](https://www.toolcabana.com/es/json-diff)
- [JSON to CSV](https://www.toolcabana.com/es/json-to-csv)
