That is a little overly neat isn't it?
Wikipedia describes it as long line of Rabbis, with Rabbis on both sides of the family, and Karl's mother being Jewish, and his father having converted to avoid persecution, but also choosing a Jewish wife, who did not convert.
Marx was not raised as Jewish; he never considered himself Jewish; and he railed against Jews and Judaism in his writings, especially in his antisemitic essay “On the Jewish Question.” He was certainly of Jewish ancestry, but calling him a “Jew” is something Hitler did.
Karl's father Heinrich (formerly Herschel) converted to Lutheranism the year before Karl was born, in order to keep practicing law after the Rhineland changed from French to Prussian control. His mother, Henriette Pressburg, converted when Karl was 7.
The family lived as very liberal Protestants without any strong religious beliefs. Karl grew up to be an atheist.