Formatador JSON
Formate, valide e minifique JSON, explore como árvore dobrável, filtre por JSONPath, corrija sintaxe quebrada e gere interfaces TypeScript ou esquemas Zod.
Roda totalmente no seu navegador: nada do que você cola é enviado.
Chaves, $, [0], curinga de array [*] e curinga de objeto * — por exemplo $.posts[*].slug. A saída e a árvore seguem o filtro; um filtro vazio usa o documento inteiro.
{
"id": 42,
"name": "RYUSLOG DEV",
"tags": [
"json",
"typescript"
],
"owner": {
"handle": "r39",
"verified": true
},
"posts": [
{
"slug": "json-format",
"views": 1200
},
{
"slug": "jwt-decode",
"views": 860
}
]
}A formatação roda no seu navegador. JSON inválido nunca é enviado a lugar algum.
Cola de JSON
referência rápida- JSON.parse(text)
- Transforma uma string JSON em valor e lança SyntaxError com vírgula final ou aspas simples.
- JSON.stringify(value, null, 2)
- Formata com indentação de dois espaços; o terceiro argumento pode ser uma string ou um número de espaços.
- undefined, function
- São descartados em objetos, mas viram null dentro de arrays na serialização.
- Date
- Passa por toJSON(), então uma Date sempre vira string ISO 8601, como 2026-11-16T05:00:00.000Z.
- "{\"a\":1}"
- Uma string JSON escapada guardada em logs ou variáveis de ambiente precisa de um desescape antes de ser analisada.
- $.posts[*].slug
- JSONPath do filtro: $ é a raiz, .key lê uma chave, [0] um índice e [*] todos os itens.
Guias de sintaxe de TypeScript
Todos os guias de TypeScriptZod infer vs TypeScript Interfaces: Runtime Validation Gaps
An interface validates nothing, z.infer is the output type and not the input, and Zod 4 renamed the error helpers. What each one actually guarantees.
TypeScriptTypeScript Decorators: Standard vs experimentalDecorators
TS1240 appears when a legacy decorator meets the stage 3 transform, and the reverse breaks NestJS DI. How the two signatures differ and which flag each stack needs.
TypeScriptTS2307 and TS2835: Cannot Find Module Under moduleResolution NodeNext
NodeNext models Node's real resolution, so .js belongs in the source import and exports maps decide what exists. Why bundler resolution hides both errors.
TypeScriptTypeScript strict Mode: TS2531, TS7006, and TS18047 Migrations
strict is nine flags at once. Count errors per code, fix them in the order that keeps the build green, and narrow instead of asserting.