Conversion happens entirely in your browser — nothing is uploaded.
What is a YAML Converter?
YAML and JSON describe the same kind of structured data with different syntax. YAML, with its indentation-based layout, comments, multi-document streams and shareable anchors, is friendlier for humans and dominates DevOps configuration: Kubernetes manifests, Helm charts, GitHub Actions workflows, GitLab CI pipelines, Docker Compose files, Ansible playbooks, and almost every modern infrastructure-as-code tool. JSON, with its strict bracket-and-comma grammar, is friendlier for machines and dominates APIs, application configs, log lines and inter-service messaging. As soon as you start gluing these worlds together — for example, feeding a Helm values.yaml into a Terraform variable, or importing a Kubernetes manifest into a JSON-only policy engine — you need a fast, lossless converter that preserves types and structure. DevFormatLab's YAML Converter performs four-way translation in your browser: YAML → JSON, JSON → YAML, YAML → Java .properties (with dot-path flattening and [n] array indices), and .properties → YAML (handling \uXXXX, \n, \t escapes and backslash line continuations). The parser follows YAML 1.2, so notorious YAML 1.1 footguns like yes / no / on / off being coerced into booleans no longer bite you — those stay as the strings you wrote. Numeric types, booleans and null values are preserved across the round trip, anchors and aliases are resolved into their final values for a self-contained JSON output, and multi-document YAML separated by --- is converted into a JSON array so you can pass an entire kubectl apply -f payload through a JSON-only pipeline. Strict validation pinpoints the exact line of any indentation or syntax error, which is usually the difference between a 30-second fix and an afternoon of guesswork. Everything runs locally — no upload, safe for production configs and secret-bearing manifests.
Features
- YAML → JSON conversion with type preservation (numbers, booleans, null)
- JSON → YAML conversion with proper 2-space indentation
- YAML → Java .properties (dot-path flattening, [n] for arrays)
- .properties → YAML (handles \uXXXX, \n, \t, backslash continuations)
- YAML 1.2 compliant — yes / no / on / off stay as strings, not booleans
- Multi-document YAML (--- separators) converted to JSON arrays
- Anchors and aliases resolved to self-contained values
- Strict validation with exact line of any syntax error
- 100% browser-based — no data sent to any server
How to use
- Pick a direction from the selector: YAML → JSON, JSON → YAML, YAML → Properties, or Properties → YAML.
- Paste your source content into the input panel on the left, or use Try sample to load a representative snippet for the selected direction.
- The converted output appears instantly on the right. Numeric types and booleans round-trip correctly across YAML and JSON; YAML 1.2 means yes / no / on are kept as the strings you wrote.
- If you're converting a Kubernetes manifest or any other multi-document YAML, include all --- separators — each document becomes one element of the resulting JSON array.
- If the source has a syntax error (mixed tabs and spaces, inconsistent indentation, unterminated string), the exact line number appears in the status bar so you can jump straight to the fix.
- Click Copy or Download to export the result, or Swap to flip the direction and re-run on the previous output.
Frequently Asked Questions
Why does "YAMLException: bad indentation of a mapping entry" appear?
▾
YAML uses spaces (never tabs) and every child of a key must indent by the same amount. The most frequent cause is mixing tab and space, or off-by-one indentation: # broken — second key indented one space less server: host: example.com port: 8080 # fixed server: host: example.com port: 8080 In the converter, the error message lists the exact line. Set your editor to "insert spaces" and use 2-space indent everywhere.
Why do my values like "yes", "no", "on" turn into true/false?
▾
YAML 1.1 treated yes / no / on / off as booleans, which still bites Ruby and PyYAML users. DevFormatLab follows YAML 1.2, where only true / false / null are reserved, so feature: yes converts to {"feature": "yes"}, not {"feature": true}. If you need a boolean, write feature: true. If you need the literal string "true" (rare), quote it: flag: "true".
How do I convert a multi-document Kubernetes manifest?
▾
Paste the whole file, including the --- separators. The converter parses each document and emits a JSON array: apiVersion: v1 kind: ConfigMap --- apiVersion: v1 kind: Service becomes [ { "apiVersion": "v1", "kind": "ConfigMap" }, { "apiVersion": "v1", "kind": "Service" } ] Perfect for feeding kubectl apply -f payloads into a JSON-only pipeline.
Why does my big number lose precision after YAML → JSON?
▾
JSON numbers are IEEE-754 doubles, so any integer above 2^53 (9 007 199 254 740 992) silently rounds. Twitter snowflake IDs and Kafka offsets are common victims. Fix: quote the number in your YAML so it stays a string: id: "1234567890123456789" This converts to {"id": "1234567890123456789"} and keeps full precision until the consumer parses it.
How do I convert YAML to a Java .properties file?
▾
Switch the direction selector to YAML → Properties. Nested objects become dot-paths and arrays use [0], [1]…: # YAML spring: datasource: url: jdbc:mysql://localhost:3306/app profiles: - dev - test # .properties output spring.datasource.url=jdbc:mysql://localhost:3306/app spring.profiles[0]=dev spring.profiles[1]=test Properties → YAML reverses the process, including \uXXXX, \n, \t escapes and backslash line continuations.
Are YAML anchors (&) and aliases (*) preserved?
▾
They are resolved to their final values. So defaults: &defaults { retries: 3 } service: { <<: *defaults, name: api } becomes {"defaults": {"retries": 3}, "service": {"retries": 3, "name": "api"}} on the JSON side. JSON has no native sharing primitive, so this expansion is by design — you get a self-contained document.
Related tools
Format, minify, validate and beautify JSON with inline error highlighting.
Compare two JSON documents side-by-side with line-level highlighting and key sorting.
Remove duplicates, empty rows, trim whitespace, convert UTF-8 ↔ Shift-JIS.
Encode and decode Base64 (and Base64URL) for text or files. Real-time, browser-only.
Encode and decode URLs, query strings and URI components with percent-encoding and form-style spaces.
Generate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes for text or files in your browser.
Convert Unix timestamps (seconds or milliseconds) to and from human-readable dates across timezones.
Decode JSON Web Tokens to inspect header, payload and signature, with readable timestamps and expiry status.
Test regular expressions in real time with match highlighting and presets.
Escape JSON into a string literal suitable for embedding into source code (double quotes and backslashes escaped).
Canonical: https://devformatlab.com/en/yaml-converter