They told police they were trying to reach the visa-free Schengen zone.
Border police said in a statement that they stopped a truck overnight Sunday near Nadlac, a town in western Romanian near the border with Hungary.
They found eight men, three women and 13 minors aged 2 to 16 inside the truck who they took for questioning.
The statement Monday said most of the migrants were asylum-seekers in Romania. The truck was driven by a Romanian man who police are investigating for trafficking migrants.
Hungary is a member of Schengen, but Romania isn't.