RevealTheme logo

Conversor de JSON para YAML

Converta JSON para YAML. Remove as chaves, as aspas e as vírgulas para obter arquivos de configuração mais limpos.

Como usar esta ferramenta

  1. 1

    Paste or type your JSON into the text box.

  2. 2

    The converter parses it with JSON.parse and renders YAML below as you type.

  3. 3

    If the JSON is malformed, a red parser error appears instead of output — fix the JSON and the YAML updates.

  4. 4

    Select the YAML in the output block and copy it into your config file.

O que é o Conversor de JSON para YAML?

O YAML é sintaticamente um superconjunto do JSON: todo arquivo JSON é YAML válido, mas o contrário não é verdade. Converter JSON para YAML é sobretudo estético: substituir as chaves por indentação, retirar as aspas das chaves simples e trocar as vírgulas por quebras de linha. Útil para traduzir respostas de API em arquivos de configuração editáveis por humanos.

Casos de uso comuns

  • Turning a JSON API response into a YAML snippet you can paste into a Kubernetes or Docker Compose file.

  • Rewriting a package.json fragment or settings blob as YAML to read it more easily during review.

  • Drafting a GitHub Actions or GitLab CI workflow when you have the config as JSON but the pipeline expects YAML.

  • Converting a JSON fixture into YAML for an Ansible playbook or a Helm values file.

  • Quickly checking how a nested JSON structure looks once the braces and commas are stripped away.

  • Producing readable YAML examples for documentation from JSON you already have.

Perguntas frequentes

O YAML voltará a se converter em um JSON idêntico?
Para dados simples, sim. As strings que contêm caracteres especiais são colocadas entre aspas para preservá-las.

Ferramentas relacionadas