ToolCabana

Formatador de JSON

Formata JSON com indentação legível.

Favorites are saved in this browser. Find them in My favorites.

Formatador de JSON

Instant results · processed in your browser
Update results automatically as you type or change settings. Turn off to run manually.Clear your input, files and result, and restore the default settings.
Load sample text to explore what this tool can do. This replaces your current input.
0 charactersClear the source text.

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.

Como usar Formatador 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.

  1. Digite ou cole sua fonte, ou carregue um exemplo.
  2. Altere as configurações básicas ou abra o modo avançado para refinar o resultado.
  3. Revise e copie ou baixe seu resultado. Pause os resultados ao vivo para executar manualmente. Fontes ou configurações individuais acima de 20,000 caracteres exigem uma execução explícita.

O que esta ferramenta suporta

Aceita JSON estrito. Vírgulas finais, comentários, aspas simples e números não finitos são inválidos. A formatação preserva os valores analisados; chaves duplicadas seguem a semântica de JSON.parse, então só seu valor final permanece.

Espaços de indentação
Range: 1 to 8
Ordenar chaves alfabeticamente
Set this value for your task.
Terminar com uma quebra de linha
Set this value for your task.
Estilo de indentação
Espaços · Tabulações

Limites e processamento

As operações de texto aceitam geralmente até 2,000,000 caracteres. Analisadores, geradores e fórmulas individuais aplicam limites adicionais mostrados pelos seus controles.

Fonte de exemplo
{"name":"ToolCabana","count":2}

Perguntas frequentes

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.

Onde minha entrada é processada?

Esta operação processa sua fonte no seu navegador. Copiar e baixar são ações explícitas; a entrada de origem não é salva em conta nem em histórico.

Quais são os limites de entrada?

As operações de texto aceitam geralmente até 2,000,000 caracteres. Analisadores, geradores e fórmulas individuais aplicam limites adicionais mostrados pelos seus controles.