jarvisbox

Convert package.json to YAML

While npm, Yarn, and pnpm all use JSON for package manifests, some tooling in the JavaScript ecosystem accepts YAML as an alternative — pnpm workspace configs, certain Babel and ESLint integrations, and documentation generators. Converting a package.json to YAML manually means retyping every key and hoping the indentation is correct.

This tool converts package.json directly to YAML, keeping keys in their conventional order: name, version, description, main, scripts, dependencies, devDependencies. Most online converters sort these alphabetically — meaning dependencies ends up before description, and scripts moves to the bottom — which confuses anyone used to reading the standard npm layout.

Paste your package.json, click Convert, and get clean YAML with the exact same field sequence you started with. The conversion is 100% client-side using js-yaml, so no data is uploaded.

Open JSON to YAML Converter →

How to use

  1. Paste your JSON object or array into the JSON input area.
  2. Leave Sort keys alphabetically unchecked to preserve insertion order (default), or enable it for canonical output.
  3. Click JSON → YAML to convert, then Copy or Download the result.

Related tools

このツールの問題を報告