Email correspondence from civil servants released through Freedom of Information has revealed “there is no legal requirement” to sit the exams.
The Liberal Democrats, who released the emails, claim this contrasts with official guidance on the tests, which make no mention of opting out.
Schools and local authorities have also claimed the exams are mandatory, according to parents.
It emerged this week many children have been left in tears over the tests, with teachers also critical of them.
Liberal Democrat leader Willie Rennie said: “Parents have the right to withdraw their children from national testing.
“However, the SNP Government hasn’t lifted a finger to tell them and deliberately avoided answering straight questions from parents about this. They have set out to deceive parents and people will be appalled by this.
“The Government hasn’t told parents anything and stonewalled them when they asked directly. They have done everything possible to give the impression that they are mandatory when they aren’t.”
The email releases show Scottish Government civil servant David Yeung responding to questions from Glasgow City Council about the rights of parents to withdraw youngsters from the exams.
“There is no legal requirement to sit the SNSA,” Mr Yeung states.
“On that basis the children can be withdrawn.”
The Lib Dems point to the release of hundreds of complaints from teacher and parents about the Primary 1 tests.
Among these were parents who say they were not given a straight answer when asked if the testing was mandatory, but instead told “the Scottish Government’s expectation is that all children in P1, P4 P7 and S3 will undertake the standardised assessments”.
Scottish national standardised assessments (SNSA) were introduced to help measure the attainment gap in schools.
Teaching union Educational Institute of Scotland submitted more than 170 pages of comments from its members to ministers.
The body will discuss the issue with its members when they return from school holidays later this month.
Education secretary John Swinney has insisted the tests were required to establish a baseline so the progress of youngsters in future years could be measured.
He said: “Standardised assessments help teachers check progress in development and behaviour and identify where additional support may be required. That is particularly valuable in early years if we are to continue to close the attainment gap.
“Assessment is already part of everyday learning and teaching, and our approach was developed after extensive engagement with teachers, parents, children and academics.”