Surprisingly, I wasn't able to find the list of symbols which can be used for separating fields in BibTeX keys. Many programming languages have their own lists of exceptions, but it seems there is none, neither for BibLaTeX, nor for Biber.

Consider the following example:

  author = {Doe, John},
  title = {Lorem ipsum},
  volume = {42},
  date = {1970-01-01},
  pages = {123--456},

Common and widely used pattern is [auth][year] (e.g. Doe1970), but what if I would like to include a sequence of homogeneous descriptors (text or numerical fields following one another)? For example, [auth][year][volume][firstpage] would result in Doe197042123, which looks clunky and hard to read; or [auth][shorttitle][year] DoeLoremipsum1970, which also doesn't look great. Can I use something like Doe+1970-42:123 or Doe_Loremipsum;1970 instead?

From what I understand, non-ASCII symbols, white spaces and commas are not allowed, and even though Biber can handle non-ASCII characters, those are usually omitted for better compatibility. However, it would be nice to have a list of characters which are not permitted at all, and a list of recommended symbols which are safe to use and won't cause any troubles upon compilation.

  • 1
    for biber see tex.stackexchange.com/a/96918/2388. Commented Jan 2, 2018 at 20:22
  • 1
    Funny, just today, my reference organizer produced an automatic bibtex key with a colon in it and I wondered about the same question. I was (very likely) going to ask the same thing in the next few days. Also, thanks for the biber link @UlrikeFischer
    – thymaro
    Commented Jan 3, 2018 at 15:28

2 Answers 2


First of all, spaces are not allowed in key names, so we can concentrate on other special characters.


I have prepared the following test file:

  author={A. Uthor},
  title={With curly braces and dollar},
  author={A. Uthor},
  title={With hyphen and caret},
  author={A. Uthor},
  title={With ampersand and hashmark},
  author={A. Uthor},
  title={With at and underscore},
  author={A. Uthor},
  title={With semicolon, colon and double quote},
  author={A. Uthor},
  title={With question and exclamation marks},
  author={A. Uthor},
  title={With parentheses, brackets, slash and asterisk},
  author={A. Uthor},
  title={With plus, equals and quotes},
  author={A. Uthor},
  title={With period, less and greater},

and a small test file with a \cite for each entry. Compiling with LaTeX shows problems for a&# because of

! Illegal parameter number in definition of \@fortmp.
<to be read again> 
l.7 \cite{a&#}

which is not really surprising. Going past the two related errors and running BibTeX shows

Stuff after "}"---line 2 of file strange.aux
 : \citation{a{
 :             }b$}


Warning--I didn't find a database entry for "a&##"

again not really unexpected. So I conclude that curly braces, even if balanced, and # are not allowed (but if # was made of category code 12 in the LaTeX document it would go through).

Now I removed the curly braces and the # from the relevant keys. The compilation was successful.

Next experiment is to add \usepackage[czech,turkish,ngerman,french]{babel} to the LaTeX document, which would make several of the characters active, but I got no problem. Note that the .aux file contains

\catcode `"\active 
\catcode `-\active 
\catcode `:\active 
\catcode `!\active 
\catcode `=\active 
\catcode `;\active 
\catcode `?\active 

Next experiment is to have the \cite commands in the argument to another command, I used \emph. Again no problem.


The forbidden characters in the seven bit ASCII range are { } , ~ # % \. I didn't text comma, percent and backslash because they're obviously not acceptable: the first on the BibTeX side, the other two on the LaTeX side.

Also ~ is disallowed (do yourself a test).


See https://tex.stackexchange.com/a/96918/2388 where it is specified that

" # ' ( ) , = { } %

are disallowed. I guess that also ~ cannot be used (for problems on the LaTeX side like for BibTeX). It goes without saying that the backslash is also out of the question.

  • 3
    Not enough reputation on my side but I think that in the conclusions "text" should read "test".
    – albert
    Commented Nov 15, 2018 at 13:02
  • @albert Yes, typo. I won't fix it, unless there's more to modify.
    – egreg
    Commented Nov 15, 2018 at 13:47
  • I just got an error on an underscore about missing $, so unsure how you dodged that
    – pdb
    Commented Mar 30, 2023 at 13:13
  • @pdb I retried and don't get errors with _.
    – egreg
    Commented Mar 30, 2023 at 16:55

Also note that in the original BibTeX, entries with { } ~ # % \ characters in keys can be crossrefed from another entry (see the following test), though this is not likely to happen in practical.

If we consider only the .bib reading process, the forbidden characters are , } plus whitespaces for a brace-style entry and , plus whitespaces for a parenthesis-style entry.

  author = {John Doe},
  title = {Item 1},
  crossref = {!"#$%&')(*+-./123:;<=>?@ABC[\]^_`abc{|}~},

  author = {Jane Roe},
  title = {Item 2},
  howpublished = {Item 2},

  author = {John Doe},
  title = {Item 3},

BibTeX runs without any warning or error.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .