Ms Riley, 35, a numbers expert on the Channel 4 show Countdown, sued Laura Murray, who is in her early 30s, over a tweet posted more than two years ago.
Mr Justice Nicklin oversaw the High Court case in London in May and delivered a ruling on Monday.
The judge said Ms Riley was “entitled” to “vindication”.
He had heard both women posted tweets after Mr Corbyn, who was then Labour leader, was hit with an egg while visiting a mosque in March 2019.
Ms Murray tweeted in response to a tweet by the television presenter.
Ms Riley initially posted a screenshot of a January 2019 tweet by Guardian columnist Owen Jones about an attack on former British National Party leader Nick Griffin, which said: “I think sound life advice is, if you don’t want eggs thrown at you, don’t be a Nazi.”
She added “good advice”, with emojis of a red rose and an egg.
Later, Ms Murray tweeted: “Today Jeremy Corbyn went to his local mosque for Visit My Mosque Day, and was attacked by a Brexiteer. Rachel Riley tweets that Corbyn deserves to be violently attacked because he is a Nazi. This woman is as dangerous as she is stupid. Nobody should engage with her. Ever.”
Ms Riley said she was being sarcastic in her tweet, did not call Mr Corbyn a Nazi, and told the judge Ms Murray’s tweet caused serious harm to her reputation.
Ms Murray was stakeholder manager in Mr Corbyn’s office when he was Labour leader, and went on to be the party’s head of complaints, before going into teaching.
She argued what she tweeted was true and reflected her honestly-held opinions.
Mr Justice Nicklin ruled at an earlier hearing Ms Murray’s tweet was defamatory.
He concluded the tweet meant Ms Riley had “publicly stated” Mr Corbyn had been attacked when visiting a mosque; that he “deserved to be violently attacked”; by doing so she had shown herself to be a “dangerous and stupid person” who “risked inciting unlawful violence”; and that people should not “engage with her”.
The judge was asked to consider whether serious harm had been caused to Ms Riley’s reputation, and whether Ms Murray had a defence of truth, honest opinion, or public interest.
Ms Riley, who studied mathematics at Oxford University and is on maternity leave from Countdown after giving birth in November, told the judge she is Jewish and has a “hatred of anti-Semitism”.
She said she speaks out against anti-Semitism and thought the Corbyn-led Labour Party was “fostering anti-Semitism”.
Ms Murray told the judge her job had involved her working with the Jewish community to “try to find solutions to the problem of antisemitism which was becoming evident within parts of the Labour Party membership”.
Mr Justice Nicklin concluded Ms Riley had demonstrated Ms Murray’s tweet had caused serious harm to her reputation.
The judge rejected Ms Murray’s argument that rejection of her defences would be an unjustifiable interference with her right to freedom of expression.