Naming rules for databases

Database names are subject to the standard Cypher restrictions on valid identifiers. See Cypher Manual → Naming rules and recommendations.

Naming rules for databases are as follows:

  • Length must be between 3 and 63 characters.

  • The first character of a name must be an ASCII alphabetic or numeric character. Support for database names starting with a numeric character is available from Neo4j 2025.01.

  • Subsequent characters must be ASCII alphabetic or numeric characters, dots or dashes; [a..z][0..9].-.

  • Names cannot end with dots or dashes.

  • Names are case-insensitive and normalized to lowercase.

  • Names that begin with an underscore and with the prefix system are reserved for internal use.

The - (dash) and . (dot) characters are not legal in Cypher variables. Names containing a - or that begin with a numeric character must be enclosed within backticks. For example, CREATE DATABASE `main-db` is a valid database name. Using dots in database names is not recommended, as it makes it difficult to determine if a dot is part of the database name or a delimiter for a database alias in a composite database.

It is possible to create an alias to refer to an existing database to avoid these restrictions. For more information, see Creating database aliases.