🥒

Gherkin Validator

Validate Cucumber feature file syntax: line-by-line Gherkin checks for scenarios, steps, Scenario Outlines, Examples tables, docstrings and tags — with outline placeholder coverage warnings. Runs entirely in your browser.

gherkin validatorgherkin syntax checkercucumber feature file validatorgherkin syntaxcucumber validator
Valid Gherkin — 5 scenarios, 20 stepsUser authentication · L50
Scenarios 4Outlines 1Backgrounds 1Rules 0Steps 20Table rows 6Docstrings 1Tags 2Errors 0Warnings 0

Scenarios

(unnamed)2 stepsL7
Successful login5 stepsL11
Bulk user import3 stepsL18
◇◇Failed login attempts@smoke3 steps · 2 example rowsL27
Account locked after repeated failures3 stepsL37
API health check4 stepsL45

English Gherkin keywords only (Feature, Rule, Background, Scenario, Scenario Outline, Examples, Given/When/Then/And/But/*). Validation runs entirely in your browser — feature files are never uploaded.

What is Gherkin Validator?

Gherkin Validator checks a Cucumber .feature file against the Gherkin grammar the way a linter would: it parses the document into features, rules, backgrounds, scenarios, steps, examples tables and docstrings, then reports line-numbered errors for structural mistakes — steps outside a scenario, a Scenario Outline with no Examples table, an unclosed docstring, tags or tables in the wrong place, misspelled keywords (with "did you mean" hints) — and warnings for the mistakes BDD teams actually make, like duplicate scenario names, empty scenarios, and Examples columns that never cover a used in the steps. All parsing runs in your browser; nothing is uploaded.

Common Use Cases

Pre-commit Feature File Checks

Paste a .feature file before pushing a commit and catch structural Gherkin errors that would otherwise surface as confusing Cucumber failures in CI.

Reviewing Pull Requests

When reviewing a teammate's BDD scenarios, validate the file and spot outline/Examples mismatches — the classic "placeholder never filled" bug — in seconds.

Teaching & Onboarding BDD

Show new team members what valid Gherkin looks like: load the sample, introduce errors deliberately, and watch the diagnostics explain the grammar.

Refactoring Test Suites

When renaming scenarios or restructuring rules, use the duplicate-name and empty-scenario warnings to keep the suite clean before it grows further.

How to Use This Tool

  1. Paste a .feature file into the editor (or start from the sample and edit it)
  2. Validation runs live as you type — errors and warnings are listed with line numbers
  3. Fix errors (red) first; review warnings (amber) for outline placeholders and duplicates
  4. Use the scenario summary table to review structure: kinds, step counts, examples rows
  5. Click "Copy report" to paste the validation result into a ticket or PR comment

Related Tools

Learn More