Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
A JSON or XML validator checks whether data can be parsed; a schema-aware validator can also check whether it follows a defined structure. For a quick check, use an online tool only with public or synthetic data. For private payloads, validate locally. For production or exchanged data, validate against the exact JSON Schema, DTD, or XSD expected by the receiving system.
Choose the right kind of validation
“JSON and XML validator” describes a category of tools, not one universal standard or product. First decide what you need checked:
| Check | JSON | XML |
|---|---|---|
| Syntax | Can a JSON parser read the text? | Is the document well-formed XML? |
| Schema or contract | Does it match a JSON Schema? | Does it satisfy a DTD, XSD, Relax NG schema, or Schematron rules? |
| Application meaning | Are the values acceptable to the application? | Are the values acceptable to the application? |
A syntax check alone does not establish that data is complete, meaningful, safe, or compatible with another system. For JSON, the syntax is defined by RFC 8259. XML distinguishes a document that is well-formed from one that is also valid against additional constraints, as explained in the W3C XML specification.
Recommended Free Tools
Quick recommendation
- One-off check of non-sensitive JSON: an online parser such as JSONLint can validate and format JSON.
- JSON contract: use a JSON Schema validator that supports the draft your schema declares.
- One-off XML check: use an XML parser for well-formedness; supply a DTD or XSD if you need schema validation.
- Private data, automation, or repeated checks: validate locally with a command-line tool, application library, or build/CI step.
- Complex XML authoring: an XML editor may help with schema-aware editing, namespaces, and related workflows; it is unnecessary for an occasional syntax check.
The W3C Markup Validation Service is useful for web-document validation and certain XML/DTD workflows, but it is not a universal validator for every XML schema language. See its scope and limitations before choosing it for a particular format.
#1 Best Overall
- Model: Dell OptiPlex 7050 Small Form Factor (SFF)
- Processor: Intel Core i7-7700 3.60 GHz
- Memory: 32GB DDR4 Ram
- Storage: 1TB Solid State Drive (SSD) Fast Boot + Storage
- Operating System: Windows 11 Pro (64-bit)
Validate JSON
What valid JSON looks like
Standard JSON uses double quotes around object keys and strings, commas between members or array items, and lowercase true, false, and null. Comments, single-quoted strings, and trailing commas are not standard JSON. Numbers must follow JSON number syntax; constructs such as NaN, Infinity, and hexadecimal literals are not valid JSON numbers. Under RFC 8259, a JSON document is a serialized value; it is not restricted to an object at the top level.
{
"name": "Ada",
"age": 36,
"active": true,
"tags": ["developer", "researcher"],
"middleName": null
}
For example, this is not standard JSON:
{
name: 'Ada',
"age": 036,
"active": True,
}
The key is unquoted, the string uses single quotes, the number uses a non-portable leading-zero form, True has the wrong capitalization, and the object ends with a trailing comma. JSON-like formats such as JSON5, JSONC, or JavaScript object literals may allow some of these features; identify the actual format before trying to validate or “repair” a file.
Check JSON in a browser
For non-sensitive input, paste or upload the document to a validator, run its check, and inspect the first reported error. Correct the issue and validate again. Format or pretty-print only after parsing succeeds: formatting changes layout, not the data contract. JSONLint describes its site as an online JSON editor, validator, and formatter. Its separate JSON Schema tool states that it uses Ajv and supports Draft 7 by default; that is a claim about that tool, not all JSON validators.
Rank #2
- AN AMAZING MAC AT A SURPRISING PRICE — With an incredibly portable and durable aluminum design, up to 16 hours of battery life,* and the A18 Pro chip, MacBook Neo is ready to go wherever school takes you.
- FOUR STUNNING COLORS. ONE DURABLE DESIGN — Choose from four beautiful colors — Silver, Blush, Citrus, or Indigo — each with a color-coordinated keyboard. And MacBook Neo is made with a durable recycled aluminum enclosure that helps it reach 60 percent recycled content by weight — the most ever in any Apple product.*
- FLY THROUGH EVERYDAY ASSIGNMENTS — Whether you’re cramming for finals, using Apple Intelligence* to summarize class notes, creating presentations, or even playing the latest Apple Arcade game,* MacBook Neo delivers the performance and AI capabilities you need to get things done.
- UP TO 16 HOURS OF BATTERY LIFE — MacBook Neo delivers all day battery life, so you can power through from early morning classes to late night study sessions without worrying about plugging in.
- A VIBRANT 13-INCH DISPLAY* — The gorgeous Liquid Retina display on MacBook Neo supports 1 billion colors, so photos and videos pop and text is crisp for easy reading.
Check JSON locally
These commands parse a file without sending it to an online service:
# Python: parse and pretty-print to standard output
python -m json.tool data.json
# jq: parse the input and emit no result
jq empty data.json
# Node.js: parse the file as JSON
node -e "const fs=require('fs'); JSON.parse(fs.readFileSync(process.argv[1], 'utf8')); console.log('valid JSON')" data.json
A successful parse confirms syntax only. In shell scripts or CI, check the command’s exit status; do not treat formatted output as schema validation.
Validate against JSON Schema
A JSON Schema can define required properties, types, value ranges, allowed strings, array contents, nested object shapes, and other constraints. For example, it can reject {"age":"thirty-six"} when age must be an integer. Before choosing a validator, check the schema’s $schema declaration and confirm the implementation supports that draft. Also check how it handles format keywords, unknown properties, custom keywords, remote references, and strictness: implementations can differ.
Rank #3
- Performance: Powered by Intel Celeron N4500 dual-core processor with up to 2.8 GHz burst frequency and 4MB L3 cache, this HP Chromebook delivers smooth multitasking for everyday computing. With 4GB LPDDR4x-2933 RAM and Intel UHD Graphics, enjoy seamless web browsing, video streaming, and productivity apps. Chrome OS boots in seconds and updates automatically, keeping your laptop secure and running at peak performance for students, professionals, and home users.
- Immersive 14-Inch HD Display: Experience clear, vibrant visuals on the 14-inch diagonal HD (1366 x 768) anti-glare display with 250 nits brightness and 62.5% sRGB color accuracy. The micro-edge design maximizes your viewing area with an impressive 80% screen-to-body ratio, perfect for streaming movies, video calls, and document editing. The anti-glare coating reduces eye strain during extended use, making it ideal for all-day productivity and entertainment in any lighting condition.
- Advanced Connectivity & Ports: Stay connected with Wi-Fi 6 (2x2) for faster wireless speeds and Bluetooth 5.3 for seamless device pairing. Equipped with versatile ports including 1 USB Type-C 10Gbps (with USB Power Delivery and DisplayPort 1.4), 2 USB Type-A 5Gbps ports, 1 HDMI 1.4b, and 1 headphone/microphone combo jack. Connect external monitors, transfer files quickly, charge your device, and expand your workspace effortlessly for maximum productivity and flexibility.
- All-Day Battery & Premium Design: The battery keeps you powered throughout your day, while the included 45W USB Type-C power adapter ensures fast charging. Featuring a sleek modern grey finish with vertical brushing pattern on the keyboard deck, this lightweight 3.35 lb Chromebook combines style and portability. The full-size modern grey keyboard and HP Imagepad provide comfortable typing and precise navigation for work, school, or entertainment on the go.
- Enhanced Security & Multimedia: Built-in H1 secure microcontroller protects your data and privacy with enterprise-grade security. The HP True Vision 720p HD camera with integrated dual array digital microphones delivers crystal-clear video calls and online meetings. HD Audio with stereo speakers provides rich, immersive sound for music, videos, and calls. With 64GB eMMC storage, you have ample space for essential files while Chrome OS seamlessly integrates with Google Drive for cloud storage.
Even a successful schema check does not settle every application rule. A schema might allow a negative amount while the business process does not. Encode such rules explicitly or validate them in application logic.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsValidate XML
Well-formedness comes first
A well-formed XML document has one root element, properly nested and matching start and end tags, quoted attribute values, and correctly escaped reserved characters such as & and <. XML names are case-sensitive.
<person>
<name>Ada</name>
<active>true</active>
</person>
In this broken example, <name> is not closed before the root element closes:
Rank #4
- [INTEL POWERED CONTENT] - Built with a 8th Generation Hexa-Core Intel i5 and 32GB of DDR4 RAM; Modern, Windows 11 ready, with 4K support, Executive multitasking, media streaming and smooth, multi-tab web browsing; Perfect as an all-purpose multimedia computer; built for content creators; Plenty of RAM and Mass storage for photo and video editing powered by Intel HD 630
- [LATEST WIRELESS TECH] - This Dell Desktop Computer easily connects to the internet through the Built In WiFi / Bluetooth
- [SOLID STATE STORAGE] - This Dell Computer setup comes with an ultra-fast 1TB Solid State Drive (SSD); Setup as the primary boot device; Boot and load programs with lightning speed ; Additional expansion available
- [BUY & OWN WITH CONFIDENCE] - From the world's largest Microsoft Authorized Refurbisher; Quality Guarantee and Free Tech Support; Award-winning Customer Service; | Support Sustainable Business
- [MODERN HI-SPEED PORTS] - USB 3.0 (x4) | USB 2.0 (x4) | DisplayPort (x1) | HDMI Port (x1) | Audio Combo Jack (x1) | Audio Out (x1) | RJ-45 Ethernet (x1) | Internal SATA (x3)
<person>
<name>Ada</person>
Schema validity is a separate check
A document can be well-formed but fail its schema. For example, an XML parser may accept an <age>unknown</age> element, while an XSD that requires an integer rejects it. A schema can also require a particular element order, namespace, attribute, or child element. XML schema options include DTD, XSD, Relax NG, and Schematron; use the one the receiving system actually specifies.
Check XML locally with xmllint
If xmllint is installed, these common commands check basic structure or validate against an XSD:
Free tools Windows power users keep installed
One-click scans. No signup required.
# Check well-formedness
xmllint --noout data.xml
# Validate against an XSD
xmllint --noout --schema schema.xsd data.xml
# Validate against a DTD declared by the document
xmllint --noout --valid data.xml
Availability and behavior depend on the installed tool and XML libraries. For regulated or industry-specific documents, confirm parser version, entity settings, namespace behavior, and support for the schema features your document uses. For repeatable build validation, Apache Ant provides an xmlvalidate task; the Ant documentation describes its configuration.
Best Value
- 🖥POWERFUL PROCESSOR and SUPERIOR STORAGE: Configured with top of the Intel Core i5 processor for lightning-fast, reliable and consistent performance to ensure an exceptional PC experience. 16GB RAM memory to smoothly run multiple applications and browser tabs all at once. 2TB HDD storage space to store apps, games, photos, music, and movies. Loaded with 16GB to zip through multiple tasks in a hurry without lag.
- 🖥️New 22 Inch Full HD (1920x1080) LED monitor: with 75hz, High-Quality panel with quick refresh rate and response time. With 1080p resolution, you can enjoy gaming or a modern computing experience. 22 Inch monitor has a Smart Contrast to provide optimized image quality. Bezel-less and sleek design with glossy finish, crisp edge-to-edge visuals. Wide Viewing Angles for clarity from any viewpoint. VESA Mountable and built-in tilt options allow for a variety of monitor configurations.
- ⌨️ +🖱️ RGB KEYBOARD AND MOUSE | RGB SPEAKER: 3 LED Colors - Blue, red, green, Backlight LED Lights for use at night time, looks amazing. The keyboard mouse and speaker are responsive, reliable, and probably plastered in RGB lights. It's important you pick the right one for your desktop.
- 💿 WINDOWS 10 Pro LATEST: A new installation of the latest Microsoft Windows 11 Professional 64 Bit Operating System software, free of bloatware commonly installed from other manufacturers. As Microsoft's latest and best OS to date, Windows 10 Pro 64 Bit will maximize the utility of each PC for years to come. Optional software such as Anti-Virus and Office 365 can also be easily downloaded through the Microsoft Windows App Store.
Watch XML namespaces
An element can look right on screen and still fail validation because it belongs to the wrong namespace. A namespace prefix is only an alias; what matters is the namespace URI associated with the element. When a validator reports an unexpected element, compare namespace URIs as well as visible names.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Common validation errors and fixes
| Message or symptom | Likely cause | What to inspect |
|---|---|---|
| JSON: “Unexpected token” | Wrong quote, comment, extra character, or malformed value | The reported character and the value immediately before it |
| JSON: “Expecting property name” | Unquoted key, broken object, or trailing comma | The start of the object member and the preceding comma |
| JSON: “Unexpected end of input” | Missing closing brace, bracket, or quote | Open structures and strings near the end of the file |
| JSON: “Invalid escape” | Backslash followed by an unsupported escape sequence | Escape sequences in the indicated string |
| JSON: error reported at the next key | A comma may be missing on the preceding member | The line before the reported location |
| XML: mismatched tag | Start and end tag names differ or nesting is broken | The element opened immediately before the error |
| XML: datatype or element-order failure | Well-formed document violates the schema | Expected type, order, required content, and namespace |
Parser locations often show where the tool noticed a problem, not where it began. If the indicated character looks valid, inspect the preceding line, delimiter, or open element.
Choosing a validator for a project
- Online validator: convenient for a quick check, visual error highlighting, or formatting when the data is public and no project-specific contract is involved.
- Local command-line tool: better for confidential input, offline use, scripting, CI, batches of files, and reproducible exit codes.
- Editor or IDE: useful for interactive work on large files, autocomplete, schema-aware editing, namespace navigation, XPath, or XSLT.
- Application library: appropriate when a service must reject malformed requests, return structured errors, and apply size, depth, time, or reference limits.
- Build integration: useful when every committed document must be checked consistently. Pin tool and dependency versions and test the schema-validation behavior the project relies on.
When comparing tools, prioritize exact schema support, privacy and data handling, automation, useful errors, performance on your file sizes, namespace and reference behavior, and maintenance. A tool that accepts a document under a different schema draft or parser configuration may not match the receiving system.
Privacy and security
Do not paste access tokens, passwords, API keys, customer records, health or payment data, proprietary configuration, or production request bodies into an unknown online validator. A site may receive the submitted content; check its data-handling practices rather than assuming an online form is private. URL-based validation can also fetch remote content, so consider what the service will request and what may appear in browser history or logs. Use local validation for confidential material.
For untrusted XML, review how the parser handles external entities, DTDs, schema includes/imports, and remote references. Configure the parser to disable unsafe external resource resolution where appropriate. For production validation of either format, impose practical limits on input size, nesting depth, execution time, and resource use; schemas and regular expressions can also introduce costly work.
Important edge cases
- Duplicate JSON keys: RFC 8259 warns about interoperability when object names are not unique. Parsers may keep the first value, keep the last, or reject the object. Avoid duplicates when data crosses systems.
- Numeric precision: JSON syntax permits numbers, but runtimes differ in numeric range and precision. A syntactically valid value may be rounded or overflow in a consumer.
- Unicode and encoding: A successful structural parse does not guarantee that every downstream system handles characters, encoding, or normalization consistently. Check the requirements of the actual interchange format.
- Passing is not proof of quality: A validator checks the rules it knows. It does not establish business correctness, security, accessibility, or interoperability unless those checks are explicitly included. The W3C Validator makes this limitation clear for its own service.
For web and XML validation options, the W3C provides service documentation and guidance that discusses online and offline tools, editors, IDEs, and batch validation. Choose by format and validation layer rather than assuming one “JSON and XML validator” checks everything.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

