Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including w3c-validator-cli with all npm packages installed. Try it out:

var w3cValidatorCli = require("w3c-validator-cli")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

w3c-validator-cli v3.3.0

Crawls a given site and checks for W3C validity.

Node W3C Validator

Travis David npm David Dev

Crawls a given site and checks for W3C validity.


$ npm install -g w3c-validator-cli


$ w3c-validator [options] <url>

The crawler will fetch all sites matching folder URLs and certain file extensions.

Tip: Omit the URL protocol, the crawler will detect the right one.

Important: Executing the w3c-validator with sites using HTML base-tag along with links without leading slashes will probably not work.


$ w3c-validator --help

  Usage: w3c-validator [options] <url>


    -h, --help      output usage information
    -V, --version   output the version number
    -l, --log       log errors in a text file
    -q, --query     consider query string
    -v, --verbose   show error details


Create a log file containing all invalid URL's including error details.


Consider URLs with query strings like as indiviual sites and add them to the sitemap.


Output additional error information in the console.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free