[{"data":1,"prerenderedAt":225},["ShallowReactive",2],{"page-en":3,"article-list-en":127,"article-en-fix-invalid-yaml":153},{"id":4,"title":5,"body":6,"description":17,"extension":18,"eyebrow":19,"faqIntro":20,"faqLabel":21,"faqTitle":22,"faqs":23,"footerRule":42,"footerRuleLabel":43,"footerTagline":44,"guideIntro":45,"guideLabel":46,"guideTitle":47,"intro":48,"meta":49,"navigation":50,"openTool":51,"path":52,"pitfalls":53,"pitfallsIntro":66,"pitfallsLabel":67,"pitfallsTitle":68,"reasons":69,"referenceIntro":82,"referenceLabel":83,"referenceNoteLabel":84,"referenceRows":85,"referenceTitle":110,"seo":111,"seoTitle":112,"stem":113,"steps":114,"workflowLabel":124,"workflowTitle":125,"__hash__":126},"pages\u002Findex.md","YAML to JSON Converter",{"type":7,"value":8,"toc":13},"minimark",[9],[10,11,12],"p",{},"Convert YAML configuration and data into standards-compliant JSON without sending the source to a conversion server.",{"title":14,"searchDepth":15,"depth":15,"links":16},"",2,[],"Convert YAML to valid JSON in your browser. Validate YAML, handle multiple documents, copy results, or download a JSON file without uploading data.","md","A focused YAML workspace","Short answers for the parts of YAML that do not map cleanly to JSON.","03 \u002F REFERENCE DESK","YAML conversion questions",[24,27,30,33,36,39],{"question":25,"answer":26},"Is my YAML uploaded?","No. Parsing, JSON generation, copying, and download preparation happen in your browser.",{"question":28,"answer":29},"Does the converter support multiple YAML documents?","Yes. Separate documents marked with --- are returned as elements of one JSON array.",{"question":31,"answer":32},"Which YAML version is supported?","The parser follows YAML 1.2 behavior, which avoids several surprising YAML 1.1 boolean conversions.",{"question":34,"answer":35},"Can every YAML feature be represented in JSON?","JSON has a smaller data model. YAML comments, anchors, tags, and formatting choices are not preserved in the JSON output.",{"question":37,"answer":38},"What happens to YAML anchors and aliases?","The parser resolves aliases to their underlying values. JSON receives the expanded data, but anchor names, aliases, and merge syntax are not preserved.",{"question":40,"answer":41},"Why did a YAML value change type?","Unquoted YAML scalars can represent strings, numbers, booleans, or null. Quote a value when it must remain text, especially identifiers with leading zeros or date-shaped strings.","Browser local. No account. Standard JSON.","THE WORKING RULE","A focused field tool for moving human-readable configuration into strict data.","A compact reference for the details that matter when a flexible document becomes strict data.","02 \u002F FIELD NOTES","Careful with YAML. Predictable with JSON.","Turn readable YAML into strict JSON, with clear syntax feedback and no upload step.",{},true,"Open the converter","\u002F",[54,57,60,63],{"title":55,"body":56},"Comments are not data","YAML comments help readers but do not belong to the parsed value. JSON output cannot retain where a comment appeared or what it described.",{"title":58,"body":59},"Anchors are resolved","Aliases and merge keys may reduce repetition in YAML. The JSON result contains the resolved values rather than anchor names or alias syntax.",{"title":61,"body":62},"Map keys must become strings","JSON object keys are strings. YAML mappings that use complex values or non-string keys may be rejected or converted in a way that needs review.",{"title":64,"body":65},"Dates need deliberate quoting","Timestamp-like scalars can be interpreted differently by YAML tools. Quote date-shaped text when the exact string must survive conversion.","Conversion preserves the data JSON can represent. Presentation details and YAML-only features may be resolved or discarded because standard JSON has no equivalent syntax.","04 \u002F CONVERSION LIMITS","Information JSON cannot carry forward",[70,74,78],{"title":71,"body":72,"icon":73},"YAML-aware errors","Parsing failures retain useful line and source context instead of returning an empty result.","lucide:scan-line",{"title":75,"body":76,"icon":77},"Multiple documents","A YAML stream containing multiple documents becomes a JSON array so no document is silently discarded.","lucide:layers-3",{"title":79,"body":80,"icon":81},"Browser-local by default","Text and local files stay in the current browser tab; no account or conversion queue is involved.","lucide:shield-check","Most everyday mappings transfer directly, but YAML offers a wider data model. The table shows the result you should expect before you convert a configuration file or data document.","03 \u002F TYPE MAP","What to expect",[86,90,94,98,102,106],{"yaml":87,"json":88,"note":89},"name: Ada","\"name\": \"Ada\"","Plain and quoted YAML strings become JSON strings. Quoting may change because JSON always uses double quotes.",{"yaml":91,"json":92,"note":93},"enabled: true","\"enabled\": true","YAML 1.2 booleans map to JSON booleans. Words such as yes and no remain strings under YAML 1.2 rules.",{"yaml":95,"json":96,"note":97},"count: 42","\"count\": 42","Ordinary integers and decimal numbers become JSON numbers, subject to JavaScript number precision.",{"yaml":99,"json":100,"note":101},"items: [a, b]","\"items\": [\"a\", \"b\"]","Block and flow sequences both become JSON arrays while retaining item order.",{"yaml":103,"json":104,"note":105},"value: null","\"value\": null","YAML null values become JSON null. An empty YAML value is also commonly parsed as null.",{"yaml":107,"json":108,"note":109},"--- \u002F ---","[{…}, {…}]","A stream with multiple YAML documents is returned as one JSON array so every document remains available.","How YAML values arrive in JSON",{"title":5,"description":17},"YAML to JSON Converter — Convert YAML Online","index",[115,118,121],{"title":116,"body":117},"Add YAML","Paste YAML, load the built-in example, or choose a local .yaml or .yml file.",{"title":119,"body":120},"Convert locally","The browser parses YAML 1.2 and serializes the resulting value as standard JSON.",{"title":122,"body":123},"Use the result","Copy formatted JSON or download a UTF-8 file for an API, app, test, or migration.","01 \u002F WORKFLOW","From readable configuration to strict data","lbNzZpvkhyr0H__VFObnw3iRANDHrUbj-BUV58n_hKA",[128,133,138,143,148],{"slug":129,"title":130,"description":131,"eyebrow":132},"fix-invalid-yaml","Fix invalid YAML before converting to JSON","Diagnose YAML indentation, tabs, missing spaces, quoting, duplicate keys, and document separator errors before converting to JSON.","TROUBLESHOOTING",{"slug":134,"title":135,"description":136,"eyebrow":137},"multiple-yaml-documents-to-json","Convert multiple YAML documents to JSON safely","Understand YAML document separators, streams, and why multiple YAML documents are normally returned as a JSON array.","DOCUMENT STREAMS",{"slug":139,"title":140,"description":141,"eyebrow":142},"yaml-anchors-aliases-json","What happens to YAML anchors and aliases in JSON","See how YAML anchors, aliases, and merge keys are resolved during JSON conversion and what information cannot be preserved.","ANCHORS AND ALIASES",{"slug":144,"title":145,"description":146,"eyebrow":147},"yaml-data-types-to-json","How YAML data types map to JSON","Learn how YAML strings, numbers, booleans, nulls, sequences, and mappings are represented in JSON and which values need review.","TYPE MAPPING",{"slug":149,"title":150,"description":151,"eyebrow":152},"yaml-vs-json","YAML vs JSON: syntax, strengths, and conversion limits","Compare YAML and JSON syntax, data types, comments, anchors, document streams, and the information that changes during conversion.","FORMAT COMPARISON",{"id":154,"title":130,"body":155,"description":131,"extension":18,"eyebrow":132,"faqs":159,"intro":169,"meta":170,"navigation":50,"path":171,"relatedGuides":172,"sections":173,"seo":219,"seoTitle":220,"slug":129,"stem":221,"type":222,"updated":223,"__hash__":224},"articles\u002Fen\u002Farticles\u002Ffix-invalid-yaml.md",{"type":7,"value":156,"toc":157},[],{"title":14,"searchDepth":15,"depth":15,"links":158},[],[160,163,166],{"question":161,"answer":162},"Does working with invalid YAML change the underlying data?","It should not change meaning when the operation is purely representational, but parsers may resolve aliases, normalize numbers, drop comments, or choose a different textual style. Compare parsed structures and review the destination’s rules.",{"question":164,"answer":165},"How can I verify the result?","Parse both sides where possible, compare keys and value types, then test the generated result in its real consumer. A visual comparison alone can miss null, number, Boolean, encoding, or duplicate-key differences.",{"question":167,"answer":168},"When should I avoid an automatic conversion?","Avoid unattended conversion when the source uses implementation-specific features, duplicate keys, custom tags, comments that carry operational knowledge, or numeric values whose precision cannot be safely represented.","YAML errors often come from invisible spacing or punctuation that changes structure. Work from the reported line and inspect the surrounding indentation level.",{},"\u002Fen\u002Farticles\u002Ffix-invalid-yaml",[144,134],[174,179,184,193,202,208,213],{"title":175,"paragraphs":176},"Indentation and tabs",[177,178],"Use spaces consistently. Tabs are not valid indentation in YAML and can look aligned while producing a parser error.","Child keys must be indented farther than their parent, and sibling keys must return to the same column.",{"title":180,"paragraphs":181,"code":183},"Colons, list markers, and quoting",[182],"Mapping colons need a following space. Sequence markers also need a space before the item value. Quote strings containing ambiguous punctuation when the parser could treat them as syntax.","# valid\nservice:\n  name: \"catalog:api\"\n  ports:\n    - 8080\n    - 8443",{"title":185,"paragraphs":186,"bullets":188},"A reliable debugging sequence",[187],"Start at the first reported error because later messages can be consequences of an earlier indentation problem. Reduce the document to the smallest failing block, then add surrounding sections back.",[189,190,191,192],"Replace tabs with spaces.","Compare indentation columns for siblings.","Check unmatched quotes and flow brackets.","Verify every document separator is on its own line.",{"title":194,"paragraphs":195,"bullets":198},"A reliable step-by-step workflow",[196,197],"Treat invalid YAML as a data transformation with an explicit input, expected structure, and destination. Work on a copy, validate before changing representation, and isolate the smallest useful sample. This separates syntax failures from data-model or application failures.","Run one change at a time and repeat the same validation after each change. For automated pipelines, fail the job on a parser error instead of publishing a partial or guessed result. Keep the original input beside the generated artifact when traceability matters.",[199,200,201],"Fix the first reported error before later ones; one missing quote can create many secondary messages.","Reduce a large document to the smallest failing fragment while preserving the nesting around the error.","After syntax succeeds, verify required keys, value types, ranges, and application-specific rules.",{"title":203,"paragraphs":204,"code":207},"Worked example and verification",[205,206],"The compact sample below is intentionally small enough to inspect by eye. Use the same pattern with a real document: confirm every key, scalar type, list order, and nested boundary before accepting the output.","A successful conversion or minification only proves that the source could be parsed. Compare the parsed value before and after the operation, then load the result with the same library or platform that will consume it in production.","service:\n  name: api\n  retries: 3\n  enabled: true",{"title":209,"paragraphs":210},"Limits and edge cases",[211,212],"The difficult cases in invalid YAML usually come from differences between syntax validity and application validity. A parser can accept data that is still incomplete, ambiguous, too large, or incompatible with a destination schema.","Never repair or normalize an unfamiliar document blindly. Duplicate keys, implicit types, aliases, precision limits, Unicode, line endings, and very large inputs deserve an explicit policy. When the destination has stricter rules, those rules win.",{"title":214,"paragraphs":215,"bullets":218},"Production checklist",[216,217],"Before release, test a normal document, an empty value, deeply nested data, non-ASCII text, and a deliberately malformed example. Record the tool or library version if another system must reproduce the exact output.","Make validation part of continuous integration when the data affects builds, deployments, APIs, or configuration. Review diffs, keep a rollback copy, and monitor the first consumer after deployment rather than assuming a syntactically valid file is operationally correct.",[199,200,201],{"title":130,"description":131},"Fix Invalid YAML — Common Syntax Errors Before JSON Conversion","en\u002Farticles\u002Ffix-invalid-yaml","guide",null,"RfChhYr1_m_pwBfJckSjBlRe8ysVCNsAbwcQguwPj8s",1791972536434]