Free JSON to YAML — no upload, no account

Convert JSON to YAML
Indent, flow level,
quote style — yours.

Free JSON to YAML converter. Control indentation, flow level and quote style. Powered by js-yaml — the same parser used by ESLint, Webpack and Prettier. Runs entirely in your browser.

Your data never leaves your browser
Custom indentation width
Block or flow output
Optional key sorting
Always free
JSON to YAML Converter   100% client-side
Conversion uses js-yaml — 150M+ weekly npm downloads, used by ESLint, Webpack and Prettier. No data is uploaded.
JSON input
  YAML ready

      
How to convert JSON to YAML

Three steps — paste your JSON and get clean YAML in seconds.

1
Paste or upload your JSON

Paste a JSON object or array, or upload a .json file. The converter validates the JSON before converting — any syntax errors are reported with their position so you can fix them before converting.

2
Choose formatting options

Set indentation (2 or 4 spaces), flow level (how deep before switching to inline syntax), quote style for string values, and whether to sort keys alphabetically — useful for config files that need deterministic ordering.

3
Copy or download the YAML

Click Convert and copy the YAML to clipboard or download a .yaml file. The output is valid YAML 1.2 compatible with kubectl, Docker Compose, GitHub Actions, Ansible, Helm and any standard YAML parser.

When to use YAML instead of JSON

Why configuration files prefer YAML over JSON.

JSON was designed as a data interchange format — compact, strict and universally parseable. YAML was designed as a human-friendly configuration language. The key advantages of YAML for config files are: no curly braces or brackets to balance, support for comments (with #), and cleaner multiline strings.

This is why the entire cloud-native ecosystem uses YAML: Kubernetes manifests, Docker Compose files, GitHub Actions workflows, Ansible playbooks and Helm charts are all YAML. If you have JSON configuration that needs to become part of any of these systems, converting to YAML is the first step.

The flow level setting is particularly useful when converting JSON to YAML for config files. A flow level of -1 (fully expanded) produces the most readable output — each key on its own line. A flow level of 2 or 3 keeps simple nested objects inline (like {port: 8080, protocol: TCP}) while still expanding the outer structure — a common pattern in Kubernetes port definitions.

When do you need JSON to YAML?

Common workflows where YAML output is required.

Kubernetes manifests

kubectl and Helm both require YAML manifests. If you have JSON configs from a tool or API response that need to become Kubernetes resources, converting to YAML is the first step before adding comments and anchors.

GitHub Actions workflows

GitHub Actions workflows are YAML files. Converting a JSON structure of steps, jobs or environment variables to YAML gives you a starting point for a workflow file that you can then edit and extend with GitHub Actions syntax.

Config file generation

Applications that accept YAML config (ESLint, Prettier, Jest, Babel, many others) are easier to configure in YAML than JSON. Converting your JSON config to YAML produces a cleaner file where you can add comments and use YAML anchors to avoid repetition.

Documentation and sharing

YAML is significantly more readable than JSON in documentation, README files and Slack messages. Converting a JSON API response or config snippet to YAML before pasting it into a Confluence page or PR description makes it much easier for colleagues to read.

Formatting options explained

What each setting controls in the YAML output.

OptionValuesWhat it does
Indentation 2 spaces · 4 spaces 2 spaces is the standard for Kubernetes, Docker Compose, GitHub Actions and most YAML consumers. 4 spaces is preferred by some teams for deeper nesting readability — both are valid YAML.
Flow level Block · Flow 3 · Flow 2 · Flow 1 Controls at which nesting depth the output switches from block (indented) to flow (inline) style. Block keeps everything expanded — most readable. Flow from depth 3 keeps the outer two levels expanded and renders deeper objects inline — a common pattern for Kubernetes port and resource definitions.
Quote style None · Single · Double None uses bare unquoted strings wherever safe — the most compact and natural YAML. Single or Double quotes every string value — useful when strings contain special characters or when the downstream parser requires quoted strings.
Key order Original · Alphabetical Original preserves the key order from the JSON input. Alphabetical sorts all keys at every nesting level — useful for config files where deterministic ordering makes diffs cleaner in version control.
Related JSON tools

Other free converters you might need next.

Popular searches
json to yaml converter convert json to yaml online json to yaml free json to yml converter json to yaml python convert json to yaml file json to kubernetes yaml json to docker compose yaml json to yaml javascript json to yaml github actions json to yaml online free json to yaml indent json to yml online

JSON converted in
your browser. No upload.

JSONshift uses js-yaml — the most widely deployed JavaScript YAML library, used by ESLint, Webpack, Prettier and over 150 million npm downloads per week — to generate YAML entirely in your browser. Your JSON is never transmitted to any server.

The output is valid YAML 1.2 — compatible with kubectl, Docker Compose, GitHub Actions, Ansible, Helm, PyYAML, gopkg.in/yaml.v3 and every other major YAML parser. No proprietary extensions, no custom syntax.

Powered by js-yaml
150M+ weekly npm downloads. Used by ESLint, Webpack and Prettier. The industry standard for JavaScript YAML generation.
Flow level control
Switch between block and flow style at any nesting depth — producing output that matches Kubernetes, Helm and Docker conventions.
Valid YAML 1.2
Compatible with all major YAML parsers: kubectl, PyYAML, Go yaml.v3, Ruby Psych, js-yaml — no consumer-specific quirks.
47 tools, always free
No file size limits, no watermarks, no account. Funded by non-intrusive display advertising only.
Frequently asked questions
Common questions about converting JSON to YAML online.
How do I convert JSON to YAML?
Paste your JSON or upload a .json file, choose your formatting options, then click Convert. Copy or download the YAML output instantly. The conversion uses js-yaml running entirely in your browser — no upload required.
What is the difference between block and flow YAML style?
Block style uses indentation and newlines — the standard readable YAML format used in all Kubernetes and Docker files. Flow style uses braces and brackets like JSON — more compact but harder to read and edit. The flow level setting controls at which nesting depth the output switches from block to flow.
Is the output compatible with Kubernetes and Docker Compose?
Yes. The output uses standard YAML 1.2 block syntax fully compatible with kubectl, Docker Compose, GitHub Actions, Ansible and Helm. Use 2-space indentation (the default) and block style for maximum compatibility with these tools.
How are JSON null and boolean values represented in YAML?
JSON null becomes the YAML null keyword (or ~ shorthand). JSON true and false become YAML true and false (lowercase). JSON numbers remain as unquoted numbers. These mappings are part of the YAML 1.2 core schema and are recognised by all standard YAML parsers.
Is my JSON data safe when using this converter?
Yes. js-yaml runs entirely in your browser. Your JSON is never uploaded to any server. Open the Network inspector during conversion — you will see zero outbound data requests (except the one-time js-yaml CDN load on first use).
Is the JSON to YAML converter free?
Yes, completely free. No file size limits, no account required. JSONshift is funded by non-intrusive display advertising.
Go up