Pretty-print the blob you already have
I paste minified logs here when I need to see structure, not when I need a schema. The page tries JSON first via JSON.parse, then a small YAML sketch, then the browser’s XML parser. A document that pretty-prints is parseable in that order. It is not “valid against the GST e-invoice schema,” not sorted into canonical key order unless JSON.stringify happens to emit it that way, and not a conversion between families. JSON in, indented JSON out. YAML in, a JSON-shaped view of what the sketch understood. XML in, a JSON-shaped view of elements.
Use this for a single-line CloudWatch blob, a Kubernetes snippet you are about to apply, or an IRN response you want to read. Do not paste production .env JSON onto a shared Zoom window. Do not expect this to implement YAML 1.2, anchors, multiline scalars, or XSD. The YAML path is a sketch; nested structure is the first thing it gets wrong. When in doubt, stick to JSON.
Worked example: trailing comma and JSONC
Paste {"rate":18,"cess":0,}. JSON.parse rejects the trailing comma. VS Code will happily show it if the file is JSONC. Strip the comma, format again, you should see two-space indent and rate as the number 18, not the string "18". That type difference matters for GST calculators and for APIs that reject "18" with a 400. Single quotes around keys also fail: this is JSON, not JavaScript.
Worked example: a GST-shaped object, minified
Paste {"gstin":"29AABCU9603R1ZM","rate":18,"taxable":10000,"cgst":900,"sgst":900}. After format you can see CGST and SGST as siblings, not a nested surprise. Change taxable to null and you will actually see the word null — logs love to stringify that as the four characters, which is a different bug. Intra-state 18% on ₹10,000 is ₹1,800 tax split ₹900 + ₹900; if your blob says IGST 1800 instead, you are looking at an inter-state invoice, not a formatter error. The formatter will not compute tax. It will only show you which keys exist.
Worked example: XML that is well-formed and still wrong
Paste <note><to>Payroll</to><amt>15000</amt></note>. The XML parser accepts it. You get a tree with to and amt. Duplicate child names collapse into arrays. Attributes are easy to lose in a simple walk. A SOAP envelope with namespaces can parse and still be useless for your XSD. If the input starts with <?xml plus a DTD that tries to fetch a network entity, this page is the wrong tool — and your browser may already refuse it. Binary XML / WBXML will just fail.
Where the YAML sketch lies
A two-line snippet such as rate: 18 may come back as a number. Nested indent, - lists, > folded scalars, and {{ mustache }} Helm files are outside the sketch. If JSON.parse can consume the input (JSON is valid YAML 1.2 in spirit, and this page tries JSON first), you get the JSON path even if you thought you pasted YAML. Huge files freeze the tab: pretty-print holds the whole string. Duplicate keys in JSON: the later one wins in JS objects, silently.
Questions
Why did my YAML come back as JSON?
The page always pretty-prints a JS object. YAML and XML are parsed into objects, then JSON.stringify’d. You are seeing structure, not a round-trip in the original syntax.
Trailing commas, comments, or undefined?
JSON.parse rejects all three. Strip comments and trailing commas first. undefined is not JSON; null is.
Does pretty-print sort keys?
No. JSON.stringify keeps the order the parser produced, which for JSON is source order. Do not treat that as canonicalization for signatures.
Will this validate a GST e-invoice against NIC’s schema?
No. Parseable is not schema-valid. Missing Irn or a wrong Typ still formats.
Can I convert JSON to YAML here?
Not as a first-class export. Format within one family, or use a dedicated converter. The YAML parser is a sketch, not js-yaml.
Why should I not paste kubeconfig?
It contains cluster tokens. Pretty-printing in this tab still puts those tokens on your screen, in memory, and in any screenshot. Use a local editor.