Actually it's questionable whether the Joker qualifies as criminally insane. The
Law and the Multiverse blog addresses the issue here:
http://lawandthemultiverse.com/2011/01/18/supervillains-and-the-insanity-defense/
Take the Joker for example in addition to
denying that he is crazy, the Joker does not actually display any likelihood, in most continuities anyway, of being eligible for an insanity defense. He always knows exactly what he is doing, and always knows that what he is doing is illegal. That, right there, means that he cannot successfully assert an insanity defense.
The same can likely be said of almost all the characters in Arkham Asylum. Very few if any of them are under the illusion that blowing up buildings is anything other than blowing up buildings. The Riddler commits crimes, knowing they are crimes, as a demonstration of his alleged intellectual superiority. Black Mask is motivated by revenge. So, arguably, is Poison Ivy (at least in certain continuities). All of them know exactly what they’re doing, and most of them display extraordinary planning and strategic capabilities. They certainly are capable of forming the requisite mental state to be guilty of a crime.
...
Of course, many supervillains do suffer from mental illnesses of some sort, even if they aren’t sufficient to make out a defense of insanity, so housing them in Arkham isn’t necessarily inaccurate or inappropriate, but neither is it evidence that the inmates there were found not guilty by reason of insanity. Many jurisdictions recognize a verdict of “guilty but mentally ill,” and this may explain why so many apparently legally sane supervillains end up in Arkham.
Let's look at the specific adjectives
xortex used. "Psychotic" is a very broad term encompassing a wide range of behaviors, but generally means being out of touch with reality, having delusions or hallucinations or impaired insight. It can also apply to bipolar disorder, i.e. manic-depressiveness. "Deranged" is simply a vernacular term for "disturbed" or "insane," with no clinical meaning. "Demented" means suffering from dementia, i.e. severely impaired cognitive ability such as the loss of memory, linguistic skills, attention and focus, or problem-solving capability, as seen in patients such as Alzheimer's sufferers. "Delusional" means holding a fixed counterfactual belief despite all reason and evidence.
So let's see. The Joker is a criminal mastermind whose intellect rivals Batman's. He's able to formulate and execute extremely elaborate master plans. So he's certainly not lacking in cognitive ability, focus, or problem-solving skills. And his linguistic skills are superb; one can't engage in effective banter and wordplay with impaired language ability. As for his memory, he seems entirely capable of remembering things that matter to him, being able to hold grudges for years or orchestrate long-term master plans. So I think it's completely wrong to say he's demented.
I'm not sure if the Joker has ever been unambiguously shown to suffer hallucinations. He seems to have a pretty good grasp of reality in most respects. But I'd definitely say he's bipolar, prone to extreme mania and shifting moods. And you could perhaps say he's delusional, in that he believes his acts of cruelty, anarchy, and homicide are a comedic performance, and in that (per some versions) he sees Batman as more a partner of sorts than an enemy, or at least as his primary audience. (The recent "Death of the Family" storyline had the Joker trying to kill off Batman's partners and sidekicks so that they wouldn't weigh him down anymore and he and Joker could get back to the purity of their early confrontations. B:TAS's "The Man Who Killed Batman" had the Joker mourning Batman's apparent death because "Without Batman, crime has no punchline."
The Dark Knight Returns had the Joker retreat into catatonia until Batman came out of retirement.)
But essentially, the modern Joker is portrayed as a serial killer, and that makes him a psychopath rather than a psychotic. Technically the diagnostic term would be
antisocial personality disorder -- a pattern of "disregard and violation of the rights of others" characterized by factors such as "failure to conform to social norms," "irritability and aggressiveness," and "lack of remorse." (I'd also throw in clinical narcissism as part of the diagnosis, particularly in Paul Dini's version.) But this is
not a disorder that meets the legal definition of insanity. As discussed in the law blog linked above, that requires being unaware of the nature of right and wrong at the time of the commission of the crime. And that's not right and wrong in the moral sense, but in the legal sense -- a crucial distinction. The Joker may sincerely believe that he's doing the right thing by inflicting chaos and suffering on the world and teaching them what a hollow joke reality is... but at the same time, he's entirely aware that what he's doing is a violation of the law. He rejects the law as a delusion in itself, as a foolish belief that order and justice exist when actually (in his view) they don't; but he does know that he is violating the law of the land when he kills people or blows up buildings or breaks out of Arkham. He just doesn't accept that he's bound by that law. So he probably doesn't qualify as
legally insane.