However, Mr Justice Ouseley also ruled that the Department for Transport (DfT) acted unlawfully in the “unfair” way it consulted on the issue of compensation for residents living near the planned rail line.
High speed rail minister Simon Burns said afterwards that the government would consult again on the issue, but insisted that HS2 would not be delayed.
Four organisations had brought five judicial review challenges to overturn government permission for the first phase of the £32 billion project, from London to Birmingham.
The ten areas of challenge included claims that the DfT failed to adequately consider alternative routes and had not complied with various European Union environmental directives.
The claimants also said that two of the consultation processes ahead of the DfT declaring its support for the HS2 rail link in January, on compensation and the phase one route, had been flawed.
According to the DfT, the judge agreed that it was lawful for the government to choose to rule out upgrading the existing network as a credible alternative to HS2.
Ouseley also found that the phase one consultation had been carried out fairly and lawfully, the department said.
Burns said: “This is a major, landmark victory for HS2 and the future of Britain. The judge has categorically given the green light for the government to press ahead without delay in building a high-speed railway from London to Birmingham, Manchester and Leeds.
“We have listened to the judge’s comments about the property compensation consultation and to save time and public money we will re-consult on this aspect – but this will not delay HS2. We remain fully committed to fairly compensating the public who are impacted by the scheme.”
HS2 Action Alliance (HS2AA), which had brought this area of challenge, said the decision was “a major victory for the more than 300,000 households blighted by HS2”.
HS2AA, which represents more than 70 local community groups, said it would appeal against the ruling that the European Strategic Environmental Assessment Regulations did not apply to HS2.
The three other objectors were: Buckinghamshire County Council, representing 15 local authorities along the route; Heathrow Hub; and Aylesbury Park Golf Club.
The local authorities said they would appeal against the decision, while the government said it would be seeking to recoup legal costs from the claimants.
The DfT said there would be a consultation on the draft environmental statement for phase one in the spring and a hybrid bill, which would grant permission for the scheme, would be ready by the end of the year.
The full judgement can be read here.