Online Free Tools
  • Home
  • Tools
  • Dev Logs
  • English
  • 中文
  • Español
  • العربية
  • Português
  • Bahasa Indonesia
  • Français
  • 日本語
  • Русский
  • Deutsch
Tools
YAML ↔ JSON Converter — Types, Multi-doc & LocalCheck HTTP Response Headers OnlineWhat Is My IP Address — See Your Public IPMarkdown ↔ HTML Converter — Sanitize & PreviewCompare Two Texts Online — Text Diff CheckerYAML ↔ JSON Converter — Types, Multi-doc & LocalCSV ↔ JSON Converter — Types, Delimiters & LocalBMI Calculator — How to Calculate Body Mass IndexROI Calculator — How to Calculate Return on InvestmentMarginal Revenue Calculator — Formula MR = ΔTR / ΔQSquare Feet to Square Meters — Area Converter for Homes & RenovationPercentage Change Calculator — From Old Value to NewGradient Calculator — Multivariable ∇f (Partial Derivatives)

YAML ↔ JSON Converter — Types, Multi-doc & Local

Convert YAML to JSON or JSON to YAML in your browser. Steps: pick a direction, paste config, optionally enable JSON-safe types, then copy or download. Multi-document YAML (`---`) becomes a JSON array. Example: turn a short service map into indented JSON for an API client — paste stays local.


      

      

How it works

Choose YAML → JSON or JSON → YAML. Conversion runs with js-yaml in this tab. Multi-document streams separated by --- become a JSON array; a single document stays a single JSON value. Errors from YAML include line and column when the parser provides a mark.

Rules you should expect

What to expect when you convert: how unquoted values are typed, how multi-document YAML maps to JSON, and where a round-trip can lose comments or formatting.

  • Typing: with DEFAULT schema, bare yes/no/on/off and some date-like scalars may become booleans or other types. JSON-safe schema keeps unquoted scalars as strings unless explicitly typed.
  • Multi-doc: loadAll — one document → that JSON value; two or more → a JSON array. We do not silently keep only the first document.
  • Loss on round-trip: comments disappear (JSON has none); anchors/aliases expand into duplicated values; key order and style may change after dump.
  • Privacy: your paste is not uploaded. Fetching js-yaml from a CDN only downloads library code, not your config text.

Example

YAML `name: demo` + list `items: [a, b]` becomes JSON `{"name":"demo","items":["a","b"]}`. JSON `{"title":"Hello","count":2}` dumps to indented YAML. Boundary: bare `flag: yes` becomes boolean true under DEFAULT schema; enable JSON-safe types to keep the string "yes".

Good fits

  • DevOps: turn multi-resource Kubernetes YAML (--- separated) into a JSON array for scripts.
  • Developers: reshape an API JSON payload into readable YAML before editing config by hand.
  • Data / AI pipelines: bridge human-edited YAML parameters with JSON-only tooling.

Frequently asked questions

Will bare yes or no become a boolean?

Under the default js-yaml schema, often yes — unquoted yes/no/on/off can become booleans. Tick “JSON-safe types” to keep those scalars as strings unless they are explicitly typed.

How do you handle multi-document YAML?

Documents separated by --- are parsed with loadAll. One document becomes one JSON value; two or more become a JSON array. We do not drop documents after the first.

Does my paste leave the browser?

Conversion stays in the tab. A CDN may serve js-yaml; that request downloads code only — it is not an upload of your YAML or JSON text.

Can I round-trip without losing anything?

No. Comments never survive JSON. Anchors expand into repeated values. Dumping JSON back to YAML will not restore original comments or anchor names.

Where do error line numbers come from?

Invalid YAML raises a parser mark with line and column when available. Invalid JSON is reported by JSON.parse without YAML-style marks.

Related tools

  • Markdown ↔ HTML Converter — Sanitize & Preview
  • Compare Two Texts Online — Text Diff Checker
  • CSV ↔ JSON Converter — Types, Delimiters & Local

References

  • YAML 1.2.2 Specification
  • js-yaml
  • RFC 8259 — JSON
Online Free Tools · Learning project · Iterating · About