WGSL Validator
Validate WebGPU shader code with the real compiler in your browser. Real errors, real line numbers.
Compiler Output
Why validate with the real compiler?
Most online shader checkers re-implement a grammar in JavaScript and drift out of date as the language evolves. WGSL is still evolving, and the ground truth is the compiler inside the browser itself. This tool feeds your code to createShaderModule and reads back getCompilationInfo(), exactly the path your own WebGPU app takes, so the messages you see are the messages your users' browsers would produce: error, warning or info, each pinned to a line and column.
A clean compile means the language is correct. It does not certify your pipeline: entry points, bind group layouts, buffer usages and adapter features get checked later, when you create pipelines and submit work. Pair this validator with our WebGPU Test to see exactly which features and limits your target devices expose.
Common WGSL mistakes this catches
Missing semicolons and unclosed braces; using let where a mutable var is required; integer/float mismatches such as comparing a u32 index with a float literal; wrong workgroup sizes; misspelled builtins; and address-space errors when writing to a read-only storage buffer. The broken sample button loads a shader with several of these planted, so you can see the output format before pasting your own code.
How to use this validator
- Paste your WGSL into the editor, or try the broken sample to see a failing report.
- Click Validate WGSL. Your browser compiles the module locally.
- Read the compiler messages: each shows its type, line and column, and the compiler's own wording.
- Fix, re-validate, repeat. Nothing you paste leaves this tab.
Frequently Asked Questions
Check Out Other Popular Tools
Aspect Ratio Calculator
Calculate aspect ratios and resize dimensions.
Tier List Maker
Create, customize, and export custom tier lists online for free. Drag & drop images or text badges into S–F tiers and export high-resolution PNG images.
Grease Trap Size Calculator
Calculate the required grease trap size (GPM) for your commercial kitchen. Uses PDI-G101 sizing logic based on sink dimensions and drainage load.
Was this tool helpful?
Comments
Loading comments...