A group of New Jersey residents had challenged the 45- year-old Texas senator's eligibility for the presidency. He was born in Canada to a Cuban father and American mother.
But Judge Jeff Masin found that Cruz met the constitutional requirements.
New Jersey's Lt Governor, Kim Guadagno, is now expected to review the decision.
Sen Cruz's main rival for the Republican nomination, Donald Trump, has also questioned his eligibility for the presidency.
Also Read
The South Jersey Concerned Citizens Committee and law professor Victor Williams, a presidential write-in candidate, argued in court in on Monday that Sen Cruz's birth in Canada meant he could not be a "natural-born citizen" as envisaged by those who wrote the US constitution.
They claimed he was a naturalised citizen and that presidents had to be born on US soil.
Cruz's lawyer argued that he was a natural-born citizen because his mother was American.
On Tuesday Judge Masin dismissed the challenge, while acknowledging that "absolute certainty as to this issue is only available to those who actually sat in Philadelphia and themselves thought on the issue".
Judge Masin added that his decision might be adopted, modified or rejected by Lt Gov Guadagno, New Jersey's secretary of state, who is authorised to make a final decision on the matter. She must transmit the names of candidates to appear on the primary ballot to county clerks by Thursday.
A similar legal challenge was rejected a court in Pennsylvania, where Sen Cruz will appear on the state's Republican primary ballot later this month.