The children, from Cookridge Primary School in Leeds, are applying for a judicial review of the city council's closure plans, which are part of a scheme to reduce surplus places.
Both the council and inspectors from the Office for Standards in Education agree that the school is doing a good job.
Cookridge's headteacher, Stuart Tomlinson, said yesterday: "We feel the fact that 20 children and their parents are prepared to come forward and apply for legal aid is a measure of the strength of opposition to the closure."
Jonathan Cairns, the solicitor acting for the children, said: "The children have properly applied for legal aid because they are the ones who will be affected by the closure."
Papers were lodged in the High Court last week and a judge's decision is expected in about two months.
The school argues that the council failed in its duty to consult properly over the closure and that it is using out-of-date figures for the number of places in the school. Mr Tomlinson said the local authority argued that there were places for 420 pupils at the school but that was not now true.
Since classrooms had been converted to a library, changing rooms and an after-school club, there was now space for only about 325. When closure was first proposed, the school had 337 pupils.
The figures are important, the school says, because a government circular earlier this year told councils to focus on schools with 25 per cent or more surplus places.
Numbers this year are down to 272 but Mr Tomlinson says that this is the result of uncertainty about the future.
He questioned the wisdom of closing Cookridge - a 1960s purpose-built, single-storey school in four acres of playing fields and grounds - and transferring the children to nearby Tinshill, a two-storey former middle school.
"The cynic would point out that this is prime development land worth about pounds 1.5 million."
He added: "A child under the age of 16 can be granted legal aid provided that they satisfy the means test and can show the merits of their case."Reuse content