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
13th Month Pay Calculator — Philippines DOLE Computation Tool
Calculate your Philippine 13th month pay instantly per DOLE rules and Presidential Decree 851. Supports prorated resigned/mid-year computations, salary raises, and TRAIN law tax exemption.
Reading Time Calculator
Estimate how long it takes to read your article, blog post, or essay. Customize reading speed and get instant results. Perfect for content creators.
Population Growth Calculator
Calculate population growth using exponential, linear, doubling-time, and logistic models. Project future population with year-by-year tables.
Was this tool helpful?
Comments
Loading comments...