Skip to content
Railroad / syntax diagram templates

Railroad — URL Structure

Simplified URI grammar: scheme, authority, path, optional query and fragment.

Template previewRailroad / syntax diagram
url ::=scheme://authoritypath?query#fragmentauthority ::=userinfo@host:porthost ::=hostnameipv4path ::=/segmentquery ::=pair&pairpair ::=key=value

Make it your own.

url       ::= scheme "://" authority [ path ] [ "?" query ] [ "#" fragment ]
authority ::= [ userinfo "@" ] host [ ":" port ]
host      ::= hostname | ipv4
path      ::= { "/" segment }
query     ::= pair { "&" pair }
pair      ::= key [ "=" value ]