Sort JSON keys

Reorders object keys alphabetically, including nested objects and arrays of objects.

{{ jsonSort.message }}

Overview

Helps stable diffs and comparisons between payload versions. Arrays keep element order; only object keys are sorted.

Tool guide

  • O que é JSON Ver secção anterior. Em objetos JSON, a ordem das chaves não tem significado semântico fixo na especificação, mas afeta diffs e leitura.
  • O que a ferramenta faz Percorre objetos (inclusive aninhados) e ordena as chaves alfabeticamente. Arrays mantêm a ordem dos elementos.
  • Por que usar Diffs estáveis entre versões de um arquivo, menos ruído em revisões e comparações automatizadas de configuração.

Effect

{"z":1,"a":{"m":2,"b":3}} → chaves a, z e depois b, m

FAQ

What is this tool for?

It runs fully in your browser: useful to validate, format, or convert data in everyday development.

Are my inputs sent to a server?

Processing happens locally with JavaScript. We do not store what you paste into the text areas.

Can I use this for real production data?

Use at your own risk. For secrets (passwords, tokens), prefer controlled environments and your company policies. And always review the generated contents. Never trust blindly things you see on the internet.