Validate VAST XML online
Short answer: if you already have the XML, paste it into the VAST validator for the fastest spec check. If you only have a live VAST URL or wrapper endpoint, start with the VAST Tag Tester first so you can fetch the response before validating it.
A VAST tag — also called a VAST XML document — is the IAB Tech Lab standard response that tells a video player how to find, display, and track an ad. A single malformed field, missing <Impression>, bad duration format, or deprecated VPAIDpattern can silently kill an impression. This guide covers the fastest way to validate VAST XML online plus the CLI and in-process options for pipelines.
Choose the right VAST debugging tool
Use the validator for pasted XML and pure spec checks, the tester for live VAST URLs and creative preview, and the inspector for hop-by-hop wrapper debugging.
Option 1: Online VAST validator (fastest)
The quickest way is to paste your tag into the vastlint web validator. It runs spec-derived validation across IAB VAST 2.0, 3.0, 4.0, 4.1, 4.2, and 4.3 and returns a structured report in under a millisecond. Nothing is stored.
If you do not have the XML yet and only have a live VAST URL or wrapper endpoint, start with the VAST Tag Tester or the VAST Inspector first. The tester is better for creative preview and click-tracking review; the inspector is better for hop-by-hop wrapper-chain debugging.
- Open vastlint.org/validate
- Paste your VAST tag or drop an
.xmlfile - Press
⌘↵or click Validate - Review errors, warnings, and advisory messages (each linked to the rule that fired)
Option 2: CLI (for CI/CD pipelines)
Install the vastlint CLI with Homebrew or Cargo and validate any file or stream from the command line. This is the standard approach for validating tags in a build pipeline or pre-flight check.
# Homebrew (macOS / Linux)
brew install aleksUIX/tap/vastlint
# Cargo
cargo install vastlint
# Validate a file
vastlint validate tag.xml
# Validate from stdin (pipe from curl, etc.)
curl -s https://example.com/vast.xml | vastlint validate -
# Exit code 0 = valid, 1 = errors found
# Use --format json for machine-readable output
vastlint validate tag.xml --format jsonOption 3: Rust library (in-process, zero overhead)
For ad servers, SSPs, and DSPs that need inline validation at bid time, embed vastlint-core directly. It validates production-size VAST tags (17–44 KB) in 363 µs to 2.1 ms on a single core.
# Cargo.toml
[dependencies]
vastlint-core = "0.4"use vastlint_core::validate;
let result = validate(vast_xml_bytes);
for issue in &result.issues {
println!("{}: {} (line {})", issue.severity, issue.message, issue.line);
}Option 4: Go binding
A Go binding wraps the same Rust core via CGo. Use it in Go-based ad servers without spawning a subprocess.
import vastlint "github.com/aleksUIX/vastlint-go"
result, err := vastlint.Validate(xmlBytes)
if err != nil {
log.Fatal(err)
}
for _, issue := range result.Issues {
fmt.Printf("%s: %s\n", issue.Severity, issue.Message)
}What VAST validation checks
vastlint applies spec-derived checks from the published IAB VAST XSD schemas. Key checks include:
- Required elements:
<Impression>,<Duration>,<MediaFile>(for inline ads),<VASTAdTagURI>(for wrappers) - Duration format: must be
HH:MM:SSorHH:MM:SS.mmm - URL validity: all tracking pixels, media URLs, and click-through URLs
- Version consistency: elements from VAST 4.x used in a 3.0 tag, or vice versa
- Deprecated features: VPAID,
AdServingIdmisuse, old delivery attributes - Duplicate impressions: multiple
<Impression>URIs that are identical - SkipOffset: value must be a valid time offset or percentage
Understanding validation results
Every issue has a severity level:
| Severity | Meaning | Action |
|---|---|---|
| Error | Tag violates a MUST requirement in the spec | Fix before serving. Likely to cause render failure. |
| Warning | Tag violates a SHOULD requirement or uses deprecated syntax | Fix soon. May cause issues on some players. |
| Info | Advisory. Tag is valid but could be improved. | Optional improvement |
Language-specific validator guides
If you are choosing a production library rather than doing a one-off browser check, start with the runtime-specific guide.
Next steps
- Common VAST errors and how to fix them
- Best VAST validator for Node.js / TypeScript
- Best VAST validator for Go
- Best VAST validator for Rust
- VAST versions explained
- Automate the same checks with the MCP server
- Use the VAST Tag Tester for live URL fetches
- Use the VAST Inspector for wrapper-chain debugging
- Open the VAST XML validator →