In LEGO Batman: The Video Game, you can unlock the Joker with the code CCB199.
This particular code corresponds to the Tropical Joker variant, which originally came bundled with a Joker Surprise toy.