NieR: Automata has a total of 26 endings: 5 of which are the main endings (A to E) while the rest (F to Z) are minor ones. You will most likely stumble upon some of these by accident while playing through the game normally as well, either by completing a seemingly inconsequential side objective or in some cases by simply dying. Also, you can go back to earlier chapters to unlock the endings you missed once you gain access to chapter select.
Ending A
Complete the game for the first time to get this ending.
Ending B
Complete a second playthrough of the game to get this ending.
Ending C
Choose A2 as your character during the final boss fight on your third playthrough.
Ending D
Play as 9S during the final boss fight on your third playthrough, then select either one of the options when the prompt appears. The resulting scene will differ depending on your choice but you will still get this ending either way.
Ending E
Unlock ending C and D then say "yes" to both of Pod 153's queries during the credits. Complete the minigame.
Ending F
Second playthrough. After 9S gets heavily damaged during the prologue chapter, fail the hacking sequence by letting the time expire.
Ending G
At the beginning of your second playthrough, have 9S abandon his support mission by jumping off the edge of the crane to the right.
Ending H
In chapter 4 after the delivering the High Viscosity Oil to Pascal, the city ruins will be attacked by Goliath class machines. When command tells you to go deal with the problem, take the path leading back to the Amusement Park. The pod will give a warning of sorts; ignore it and keep heading in that direction until your pod informs you of the consequences.
Ending I
1st playthrough. Defeat Adam in the Copied City then abandon 9S by moving away from him.
Ending J
On your first playthrough upon entering the abandoned factory with Pascal near the end of the game, destroy the priest.
Ending K
This is an odd one. Complete the sidequest "Jackass's Research" and pass some time by doing other things. Eventually (sometime during chapter 5 for me), you will receive an e-mail from Jackass about how she wants to give you a fish so she could find out what happens if an android consumes it. Go to the camp at the desert area of the city ruins and talk to her to get a Mackerel. Select the fish from your inventory and use it.
Ending L
On your first playthrough, run away from the final battle to get this joke ending.
Ending M
3rd playthrough. When Pascal sends a distress call to A2 asking for help about his village, ignore his plea and head somewhere far away instead, like the Abandoned Factory.
Ending N
Be the "daranged android" and murder every single inhabitant in Pascal's Village.
Ending O
On the prologue chapter of your third playthrough, an EMP blast during YoRHa's big battle with the machines will cause 2B to reboot. Have 9S abandon 2B by moving away from the combat zone.
Ending P
On the prologue chapter of your third playthrough, allow 2B to die from the logic virus without reaching the commercial facility.
Ending Q
3rd playthrough. When playing as 9S near the end of the prologue, abandon 2B instead of rushing to her at the commercial facility.
Ending R
3rd playthrough. When A2 joins Pascal at the Abandoned Factory, destroy the child machines.
Ending S
3rd playthrough. Have 9S run away from the Davola and Papola during the Tower hacking sequence.
Ending T
Another quick one here. Simply remove your OS chip to cause a fatal error and get this ending.
Ending U
Joke ending. Blow up the Bunker by having your character self-destruct.
Ending V
3rd playthrough. Have 9S fight alongside Davola and Papola until they run out of energy during the tower hacking sequence.
Ending W
This is perhaps the earliest ending you can get. All you need to do is die during the prologue mission at the Abandoned Factory. Use Chapter Select to unlock this in case you missed it.
Ending X
3rd playthrough. When an infected 2B gets attacked by YoRHA units at the commercial facility, have A2 run away instead of helping her.
Ending Y
Let the Emil Head boss self-destruct during the quest Emil's Determination.
Ending Z
3rd playthrough. Destroy Pascal when A2 meets him for the first time outside the Resistance Camp.