Within the comics continuity, yes.
Comics Alliance explains that the story of The Brave & The Bold #191 is about Batman and The Joker teaming up to figure out who murdered The Penguin on live TV.
Comics Alliance also notes that such team-ups between them have occurred multiple times, but always as a matter of extenuating circumstances.
For one thing, it’s a Batman/Joker team-up story.
That actually happened more often than you might expect
— Bob Haney did it twice during his run, within eight issues of each other — but it’s always one of those things that requires some extenuating circumstances.
scifi.stackexchange.com/users/5184/phantom42
In Batman: Legends of the Dark Knight Vol 1 145
The Joker is dying, but is the only one with the knowledge that Batman needs to save the day.
Batman is forced to put the Joker in a Lazarus pit to save him.
Anyone else who is resurrected by the Lazarus pit comes out temporarily insane.
As usual, things are subverted with the Joker, and he emerges from the pit calm, rational, and filled with genuine remorse for all of the pain he has caused.
This newly sane Joker goes with Batman to defeat Ra's al Ghul.
(Not that he's useful, he just mopes around a lot).
And, of course, the effects of the Lazarus pit are temporary, so by the end he's back to the insane psychopath we know and love.
scifi.stackexchange.com/users/55214/Andrew Shepherd
While not exactly an alliance in the classic sense of the word, there is a certain amount of cooperation in the Arkhamverse, especially in City and Knight.
Note: spoilers for the Arkham City and Arkham Knight video games follow.
Arkham City, Batman is forced to help Joker find a cure for his illness after being infected with his blood.
Batman finds a cure together with Mr Freeze, and administers it to himself, but before he can cure Joker, Joker ambushes him, accidentally destroying the only cure that can heal him.
Joker dies shortly afterwards.
In Arkham Knight, it is revealed that Joker's blood turned the infected people insane, Joker style.
4 people were infected, along with Batman.
3 of the normal people infected turned into Joker copycats soon after infection.
The 4th infection took hold during the events of Arkham Knight.
Early during the events of Arkham Knight, Batman inhales a large dose of Scarecrow's toxin, forcing the Joker Personality to emerge.
The Joker Personality is present throughout the rest of the main storline.
providing comments on the situation in Joker's classic sarcastic tone.
During 2 segments of the storyline, the Joker takes control over Batman.
The first time, it is unintentional, after Scarecrow sprays additional toxin in Batman's face onboard the Stagg zeppelin.
The second time could be seen as intentional: Batman has been forced to surrender to Scarecrow to save his friends, and Scarecrow injects him with toxin.
Unbeknownst to Scarecrow, Joker was waiting for this moment to take over Batman.
Scarecrow thus was surprised when Batman said he was not afraid, and injected him again.
This then made Joker become afraid of being forgotten and allowed Batman to take control again.
Neither of these are alliances in the classic sense of the word, but especially the events of City sound like what you are looking for: a common goal in saving both of their lives.
Arkham Knight is a bit more tenuous, but it could be argued that they both had the common goal of saving Gotham from Scarecrow, although Joker had the goal on top of that of gaining control over Batman.
scifi.stackexchange.com/users/24603/Nzall
Yes.
In Batman: Brave and the Bold cartoon, Batman teamed up Joker to fight Owlman.
The Episode is "Game Over for Owlman!"
scifi.stackexchange.com/users/931/Umbrella Corporation
During the Justice Leagues story arc, the original JLA was erased from everyone's memories, and the various League members each created their own interpretation of 'A' (Aliens for Superman, Atlantis for Aquaman, etc.).
Batman created the Justice League of Arkham, for which the Joker was a member.
They worked together at first, but near the end the Joker and the rest of the villains turned on Batman.
scifi.stackexchange.com/users/43649/Xavon_Wrentaile
Yes, he recently teamed up with the Joker in Batman:
Europa when both are infected with a deadly virus:
scifi.stackexchange.com/users/60297/Emma Vega
Also in Lego Batman 3:
Beyond Gotham most of the heroes and villains team up to defeat Brainiac including Batman and Joker.
However this may not be canon.
scifi.stackexchange.com/users/1132/Jeremy French
I don't mean true alliance, but have they ever fought some kind of common enemy or had a common goal?  For example, I can imagine Batman fighting some kind of oppressive regime due to his virtuous principles he believes in, and Joker would be interested too - because he just loves creating chaos.
Has Batman ever teamed up with Joker?
scifi.stackexchange.com
<dc><batman>
scifi.stackexchange.com/questions/106571
scifi.stackexchange.com/users/55192/adam 9999
There are multiple occasions on which Batman and Joker have teamed up together. These include the story entitled The Brave and the Bold (#191) and the Justice Leagues story ark. There is also an episode in the Batman: Brave and the Bold cartoon in which this happens, entitled "Game Over for Owlman". Batman and Joker have teamed up in the comics - in the story The Brave & The Bold - and they have cooperated in the films in the Akrhamverse,
Yes - in the comics, in the story The Brave & The Bold. Yes, in a sense, in the Arkhamverse, where they at least cooperate a bit.