LOCAL DATA VALIDATION
Validate JSON and XML locally
Utilities for code and web development.
Paste JSON or XML to check its syntax in your browser. The source is not sent to an external validation service.
Review parser-reported line and column positions when available, along with a count of document elements, properties, and nesting depth.
XML DTD and ENTITY declarations are rejected for safety. The validator does not load schemas, execute data, or fetch external resources.
Paste source code or open a file
UTF-8 input · up to 2 MB · source is processed in this browser
Choose JSON or XML, then paste source or open a local file.
Validation result
JSON structure
Parser detail
What the JSON and XML validator checks
Use one local page to check common JSON and XML input before you paste it into an editor, API request, or configuration file.
- Strict JSON syntax through the browser’s JSON parser, including objects, arrays, strings, numbers, booleans, and null.
- XML well-formedness through the browser XML parser, including matching tags, quoted attributes, namespaces, and a single document root.
- Error line and column when the browser parser exposes a usable location.
- A compact count of JSON values, objects, arrays, properties, and nesting depth.
- A compact count of XML elements, attributes, text nodes, root name, and nesting depth.
- Open UTF-8 .json and .xml files locally. The selected file content is not uploaded.
- Russian and English text is preserved as Unicode; Cyrillic and non-ASCII names and values are accepted.
- XML DTD and ENTITY declarations are blocked. External references are not resolved.
How validation works and what it does not check
JSON is parsed with the browser’s native JSON parser. The tool does not execute values, inspect application schemas, or verify whether a property is accepted by a particular API.
XML is parsed as application/xml with the browser’s native DOMParser. This checks well-formed XML syntax; it does not validate an XSD, DTD, Relax NG schema, or business rules.
The validator does not make network requests to third-party parsing services. Source remains in the current page; only a fixed action name and a random visitor identifier are used by the site action counter.
Frequently asked questions
Does this validator send my source to a server?
No. JSON and XML parsing runs in the current browser page. The action counter receives only a fixed action name and a random visitor identifier.
Which JSON values are accepted?
Objects, arrays, strings, numbers, true, false, and null are accepted when they follow JSON syntax. Comments and trailing commas are not valid JSON.
Does JSON mode check an API schema?
No. It checks JSON syntax and summarizes structure. It does not compare property names or value types with an API contract.
What does XML mode validate?
It checks whether the document is well-formed XML, including tag matching, quoted attributes, and a single root element.
Can I validate XML against an XSD or DTD?
No. This tool does not load or apply XSD, DTD, Relax NG, or application-specific schemas.
Why are DOCTYPE and ENTITY declarations rejected?
They can introduce external or expanded entities. The local validator blocks these declarations and does not resolve external resources.
Will a file with Cyrillic text work?
Yes. UTF-8 file text and Unicode names or values, including Cyrillic and English, are supported.
Which files can I open?
JSON mode accepts .json files and XML mode accepts .xml files. The file must be valid UTF-8 and no larger than 2 MB.
Why is an error position missing?
Some browsers do not expose a source offset for a parser error. In that case the tool shows the error without guessing a line or column.
What do the structure counts mean?
They count nodes in the parsed document. The counts describe its shape; they do not determine whether the data is correct for a particular application.
Does the tool format or rewrite my data?
No. It only validates and summarizes the source. The input text is not automatically changed.
What is the nesting limit?
JSON and XML are limited to 256 nested levels, with an additional node limit for large documents to avoid excessive browser work.
Source text and local file contents stay in this browser. Action tracking does not include source, filename, or diagnostics.