A prevalent aspect of contemporary digital campaigning is the use of humor to attract attention, elicit amusement, and mark group boundaries. This study investigates the humor in digital campaigns during two recent Finnish parliamentary elections, focusing on how different styles of humor are used to (de)legitimize political ideas and actors. Our original dataset consists of 125,604 posts by 1262 candidates on Facebook six months before the 2019 and 2023 election days. Using Facebook’s haha reactions and manual coding to annotate humor style, we focused on 729 posts with seemingly intentional humor by candidates. We show how different parties and individual candidates used humor to varying degrees and in different styles. Overall, the proportion of humorous posts was not high, but the populist radical right Finns Party candidates used humor by far the most, and their style was primarily aggressive, aimed at delegitimizing the incumbent government, political opponents, and their reference groups. Candidates from other major parties also used some humor, but overall the tone was more positive. Some of these candidates were profiled as “humor specialists” who produced similar combinations of ridicule and anti-elitism as the Finns Party candidates or, alternatively, focused on disseminating self-deprecating and affiliative humor. Affiliative and self-deprecating humor was used to foster closeness, ordinariness, and spontaneity, thus legitimizing oneself as a relatable candidate. The paper discusses how candidates use humor strategically to stand out in a competition for attention between candidates, and elaborates on the implications of using different humor styles in strategic political communication.