Hack the Hydra

JSON to YAML converter

Paste JSON and get readable YAML for Kubernetes manifests, Docker Compose, GitHub Actions or OpenAPI files. Strings are quoted only when YAML would misread them, such as "true", "null" or text with a colon.

🔒 Private by design: the conversion runs in this browser tab. Nothing is uploaded.

JSON to YAML converter is a free online tool by Hack the Hydra. Convert JSON to YAML online. Choose 2 or 4 space indentation, strings are quoted only when needed. Ready for Kubernetes, Docker Compose and CI configs. Runs in your browser.

100% freeNo upload: runs in your browserNo sign-up
JSON to YAML converter: the tool with a sample file converted

When you need it

Many tools accept both formats, but configuration files are usually written in YAML because it is easier to read and allows comments. If you have an API response, a package manifest or a generated config in JSON, converting it gives you a file you can edit by hand and commit.

How values are written

Numbers and booleans stay unquoted. The strings "true", "false", "null", "yes" and "no" are quoted, because YAML 1.1 parsers would otherwise turn them into booleans or null. Strings containing a colon, a hash sign, leading spaces or other special characters are written in double quotes using JSON escaping, which is valid YAML. Empty objects and arrays become {} and [].

Limits

JSON has no comments, so none appear in the output. Multi-line strings are written on one line with \n escapes rather than block scalars, which is always correct but less pretty. Always check the result with your own tool (for example kubectl apply --dry-run) before deploying.

Example

Nested JSON converted to YAML with two-space indentation.

Input

{"name":"Ada","skills":["math","code"],"address":{"city":"London"}}

Output

name: Ada
skills:
  - math
  - code
address:
  city: London

How to use

  1. Type or paste your text in the box above.
  2. The result updates as you type; change the options to switch mode.
  3. Copy the result or download it.

FAQ

Is my JSON uploaded?

No. The conversion is done by JavaScript in your browser tab and nothing is sent anywhere, so it is safe for configs that contain internal names.

Why is "true" in quotes in the YAML output?

Because it was a string in your JSON. Without quotes, YAML would read it as a boolean, which changes the meaning.

Can I convert YAML back to JSON?

Yes, use the YAML to JSON converter on this site. It also reads files with several --- documents.

Is the output valid for Kubernetes and Docker Compose?

Yes, the output is standard YAML. Both tools read it as long as your JSON already had the right structure.

Guides

More free converters

PDF to Markdown converterOCR PDF: scanned PDF to textImage to text (OCR)Word (DOCX) to Markdown converterExcel & CSV to Markdown tablesHTML to Markdown converterPowerPoint (PPTX) to Markdown converterJSON to Markdown tablePDF to text converterExcel to JSON converterMarkdown to HTML converterMerge PDF filesSplit PDF: extract pagesRotate PDFJPG to PDF converterPDF to JPG converterImage converter: PNG, JPG, WebPCompress image: JPG and WebPQR code generatorWord counterCase converterJSON formatter and validatorBase64 encode and decodeURL encoder and decoderUUID v4 generatorStrong password generatorLorem ipsum generatorJSON to CSV converterRemove duplicate linesUnix timestamp converterText diff checkerImage resizerPercentage calculatorAge calculatorHash generator (SHA-256, SHA-1, SHA-512)Color converter: HEX, RGB, HSLDays between dates calculatorYAML to JSON converterUnit converterJWT decoderBinary, hex, decimal and octal converterRoman numeral converterRegex testerCron expression explainerPDF to Markdown for ChatGPTPDF to Markdown for ClaudePDF to Markdown for RAG pipelinesPDF to Markdown for ObsidianPDF to Notion (via Markdown)Screenshot to textFrench OCR: image to textCSV to Markdown tableGoogle Docs to MarkdownJPG / JPEG to text (OCR)PNG to text (OCR)CSV to JSON converterPNG to JPG converterJPG to PNG converterWebP to PNG converter