JSON, XML & YAML Parser
Paste or open a JSON, XML or YAML file to validate it (with the exact line and column of any error), browse it as a collapsible tree, search values and keys, look values up by path, pretty-print or minify it, and convert between formats. Everything runs in your browser — your input and files are never sent to a server.
You can also drag a JSON, XML or YAML file onto the input box. Files are read only in this browser (UTF-8, up to 2 MB). The format is detected from the extension and content, and the file is opened in the matching tab.
Structure summary
Search
Tree
Click an item to see its path here
Find by path
A subset of JSONPath is supported: $.a.b · $.list[0] · $.list[-1] · $.list[*].name · $..price · $.list[0:2] · $.list[?(@.price < 10)] · $['key name']
Format & convert
Conversion rules: keys become element names, and arrays become repeated elements of the same name. A "@name" key becomes an attribute and a "#text" key becomes the element's text. Characters not allowed in element names become _. An object with a single key uses that key as the root (otherwise the "Root name", or root if empty). YAML output is a direct copy; strings are quoted only when they could be mistaken for another value (true, 007 …).
You can also drag a JSON, XML or YAML file onto the input box. Files are read only in this browser (UTF-8, up to 2 MB). The format is detected from the extension and content, and the file is opened in the matching tab.
Structure summary
Search
Tree
Click an item to see its path here
Find by path
A subset of XPath is supported: /root/item · //name · /root/item[2] · //item[@id='a'] · //item[title='x'] · //item/@id · //name/text() · a bare name is searched anywhere
Format & convert
Conversion rules: attributes become "@name" keys, and text next to attributes or children becomes a "#text" key. Repeated names become an array and empty elements become null. Comments and processing instructions are dropped. XML values have no type, so everything is a string by default (same for JSON and YAML).
You can also drag a JSON, XML or YAML file onto the input box. Files are read only in this browser (UTF-8, up to 2 MB). The format is detected from the extension and content, and the file is opened in the matching tab.
Structure summary
Search
Tree
Click an item to see its path here
Find by path
YAML is read into the same structure as JSON, so JSONPath works: $.a.b · $.list[0] · $.list[*].name · $..price · $.list[?(@.price < 10)] · $['key name']
Format & convert
Conversion rules: YAML is read into the same structure as JSON, so converting to JSON is a direct copy. Converting to XML follows the JSON→XML rules (keys become element names, arrays repeat, "@name" attributes, "#text" text). Comments are lost on conversion.
Good to know
- JSON is read strictly — comments, trailing commas, single quotes and unquoted keys are reported as errors.
- Numbers are kept exactly as written, so 12345678901234567890 or 1.0 survive formatting and conversion unchanged.
- A repeated key is not an error but is reported as a warning (real programs keep only the last value).
- Internal DOCTYPE declarations (ENTITY) in XML are rejected, not interpreted — they are the entry point for entity-bomb and external-file attacks. Declarations pointing to an external DTD are skipped, never fetched.
- XML only decodes < > & " ' and numeric references (A). Any other &name; is an error.
- Input is limited to 2 MB and 200 levels of nesting.
- YAML supports the common syntax — maps, lists, quoted text, | > block scalars, [ ] { } flow style and comments. Anchors (&), aliases (*), tags (!), multiple documents (---), ? complex keys and multi-line quoted text are not supported and reported as errors. Aliases can also be used to blow a document up exponentially, so they are never expanded.
- YAML values follow the 1.2 rules: only null, true/false and decimal numbers become values; yes/no, 0x1F and dates stay strings. Indentation must use spaces (tabs are an error).
FAQ
Is my JSON/XML sent to a server?
No. Parsing, validation and conversion all happen in this browser; nothing is sent or stored.
How is this different from Code Beautifier or the JSON tab in Developer Tools?
Those rewrite code prettily; this reads structure: tree browsing, lookup by path, error positions, a structure summary, and JSON↔XML conversion.
Numbers come out as strings when I convert XML to JSON.
XML values have no type, so everything is a string by default. Turn on "Turn numbers and true/false into values" to convert only number-looking text (leading-zero values like 007 stay strings).
Is JSON → XML → JSON lossless?
Within this tool's rules (attributes "@", text "#text", repeats as arrays), yes. An empty string and null both become an empty element and come back as null, and keys that are not valid element names are renamed.
Why are YAML anchors (&) and aliases (*) not supported?
Aliases let a document reference the same content many times and grow billions of times larger in a few levels (an "alias bomb"), so they are reported as errors instead of being expanded. Paste the expanded text instead.