Convert YAML and JSON without uploading a thing
LOCALConvert YAML to JSON and back in your browser with a real YAML 1.2 parser that keeps line and column errors and never uploads.
How it works
- 01
Pick a direction
Choose YAML to JSON or JSON to YAML. The two paths are not symmetric: YAML carries comments, anchors and several documents, while JSON is strict single-document data, so converting to JSON drops information and converting back only adds formatting again.
- 02
Paste a complete document
Indentation must use spaces, because a leading tab is a syntax error, and strict JSON rejects single quotes, trailing commas and comments. An empty box shows a hint rather than a red error at all.
- 03
Convert and copy
Press Convert to parse on demand and keep the reported line and column when something fails. Files with several --- separated documents are refused with a clear message instead of being silently merged; the result appears in a read-only box.
When to use it
Kubernetes manifests
Many dashboards, policy engines and API clients only speak JSON, so converting a manifest shows what the cluster will store. Keep the YAML as the source file and convert only a temporary copy.
CI pipelines
GitHub Actions and GitLab CI files are YAML, while scripts often want JSON. Hand conversion breaks on implicit types, so this tool follows YAML 1.2 and leaves on as a string.
OpenAPI specs
OpenAPI files are usually YAML but consumed by JSON validators, mock servers and code generators. Converting lets you diff the spec or paste it into a JSON-only service, though comments will not survive.
Questions
Is my YAML or JSON uploaded anywhere?
No. The YAML parser and JSON writer run in your browser, the page sends no text, and no copy is ever stored. The only request is an anonymous use counter that carries the tool name and nothing else; closing the tab discards everything. Nothing is kept between visits, and no account is required.
Why did my comments disappear?
YAML comments are notes for humans, not data, so the parser drops them before a value exists, and JSON has no comment syntax at all. If those notes matter, keep the YAML as the source of truth, treat the JSON as a generated artifact, and never waste time editing comments back into it by hand.
What happens to anchors, aliases and merge keys?
Aliases are resolved while parsing, but JSON has no reference syntax, so every alias is written out again at each use. Merge keys written as << are a YAML 1.1 extension; this parser follows the 1.2 core schema, so << stays a literal key and recursive anchors produce a clear error instead of invalid output.
Are yes and no converted to booleans?
Only true and false are booleans in YAML 1.2, the schema this parser follows; yes, no, on and off stay ordinary strings. That difference has burned many pipelines, where an older tool reads on as true and a modern one reads it as text, so quote values that must survive when unsure.
Why did 0123 become 123, and what about dates?
Plain scalars are typed implicitly: 0123 becomes the number 123, 1.0 becomes 1, and an unquoted 1.10 loses its trailing zero. Integers beyond JavaScript's safe range lose precision, and this tool keeps dates as strings while some YAML libraries turn them into native dates. Quote any date that must stay identical.
Can I convert a file with several documents?
A YAML stream can hold several documents separated by ---, but JSON has exactly one top-level value, so there is no honest way to convert the whole stream at once. Split the file, convert each block, or keep the pieces separate on purpose.