This section provides a general overview of how Cypher® parses an input string.

The Cypher parser takes an arbitrary input string. While the syntax of Cypher is described in subsequent chapters, the following details the general rules on which characters are considered valid input.

Using unicodes in Cypher

Unicodes can generally be escaped as \uxxx.

Additional documentation on escaping rules for string literals, names and regular expressions can be found here:

The following example escapes the unicode character A (\u0041) in the keyword MATCH:

M\u0041TCH (m) RETURN m;

Supported whitespace

Whitespace can be used as a separator between keywords and has no semantic meaning. The following unicode characters are considered as whitespace:

Description List of included Unicode Characters

Unicode General Category Zp


Unicode General Category Zs

\u0020 (space), \u1680, \u2000-200A, \u202F, \u205F, \u3000

Unicode General Category class Zl


Horizontal Tabulation

\t, \u0009

Line Feed

\n, \u000A

Vertical Tabulation


Form Feed

\f, \u000C

Carriage Return

\r, \u000D

File Separator


Group Separator


Record Separator


Unit Separator


It is possible to have multiple whitespace characters in a row, and will have the same effect as using a single whitespace.

The following example query uses vertical tabulation (\u000B) as whitespace between the RETURN keyword and the variable m:

MATCH (m) RETURN\u000Bm;