EBNF Railroad Diagram Generator
This tool generates railroad (syntax) diagrams from Extended Backus-Naur Form (EBNF) specifications.
Enter your EBNF grammar in the text area on the left and see the railroad diagram update in real-time below.
Supported syntax:
- <rule> - Non-terminal
- "text" or 'text' - Terminal
- ::= - Definition
- | - Alternative
- ( ) - Grouping
- ? - Optional (0 or 1)
- * - Zero or more
- + - One or more
Example Grammars:
- Simple Greeting - Basic example
- Arithmetic Expressions - Math expressions
- JSON - JSON format grammar
- URL - URL structure
- SemVer 2.0 - Semantic versioning