How to use the reference list alphabetizer
- Paste your references, one per line.
- Choose letter by letter or word by word ordering.
- Tick the options to ignore a list number at the start, to ignore A, An and The, and to remove lines that are exactly the same.
- Copy the sorted list. The table beside it shows the sort key each line was given.
Formula
key = line without a leading list number and article, with accents and case removed
letter by letter: delete every character that is not a letter or digit
word by word: turn runs of other characters into one space
sort by key; equal keys keep the order you pasted them in
In letter by letter order a space does not count, so Mac Donald and MacDonald sort together. In word by word order a space comes before every digit and letter.
Four names that differ in one space
The lines MacDonald, K.; Mac Donald, B.; MacDonald, A.; and Mac, Z. sort letter by letter by the keys macdonaldk, macdonaldb, macdonalda and macz. The result is MacDonald, A.; Mac Donald, B.; MacDonald, K.; then Mac, Z.
Sorted word by word, the keys are macdonald k, mac donald b, macdonald a and mac z. A space comes first, so the order becomes Mac Donald, B.; Mac, Z.; MacDonald, A.; MacDonald, K. With the article option on, The Apple sorts under A, and with it off it sorts under T.
Which order to choose
Style guides differ. Many reference lists in the sciences use letter by letter order, which ignores spaces, hyphens and punctuation. Some indexes and library lists use word by word order, in which a shorter word comes first. Use the order your guide names, and read its notes on names with prefixes such as van, de or Mc, which the guides handle in different ways.
For writing tasks, count words with the Word Counter, look at the common words in a text with the Word Frequency Counter, or check sentence length with the Sentence Length Analyzer. Spreadsheet data can be ordered with Sort CSV by Column.
Accents, numbers and other scripts
Letters with accents sort as the plain letter, so Alvarez and Álvarez share a key. Digits come before letters, so a title starting with 1984 sorts before one starting with A. Characters outside the Latin script are compared by their code order, which is not the order a dictionary of that language uses, so check lists in other scripts by hand.
Assumptions and limits
- Each reference is on one line, and the whole line is used for sorting.
- Only a leading list number and a leading article are removed from the key. The line itself is not changed.
- Lines with the same key stay in the order you pasted them.
- Up to 2,000 lines of 2,000 characters are read, and nothing is uploaded.
Frequently asked questions
Does the tool change my references?
No. It only reorders the lines. The sort key is shown in the table beside the list but is not added to the copied text.
How are two references by the same author ordered?
By the rest of the line, since the whole line forms the key. If the lines start the same, the year or title decides, which is usually what a style guide asks for.
What does ignoring a list number do?
It removes starts such as 3., [3] or (3) when making the key, so a numbered list sorts by its text and not by its numbers.
Can I remove duplicates?
Yes, tick the box to drop lines that are exactly the same as an earlier one. Lines that differ by even one character are kept, and the number removed is shown.