The pipe trick uses the pipe character ("|") to save typing the label of a piped link for several kinds of wiki links. This can avoid potentially making an error while typing the label.

When the last character of a link is the pipe character, the pipe trick will automatically generate the text that displays for that link. Its processing removes the parenthesized part of the link title, handles commas in the title, and removes namespace prefixes. The described processing happens at the point of saving the page data, and the generated text is saved with the rest of the page's wiki markup – thus, it is merely an aid to editing.

An even better way to save keystrokes that doesn't need any additional character is by simply attaching text to the link, as in "[[train]]s".

The pipe trick doesn't work in edit summaries, within <ref> tags, or links to sections – see below.

The basic rule when the pipe trick is used is that an (initial) namespace prefix, a final part beginning with a comma, or a final parenthesis (usually intended for disambiguation) is suppressed in the rendering of the link. The rendered text is case neutral and so should be entered precisely as the user wishes it to appear in the article. In case of combinations of suppressible parts, the following rules apply: