Twenty seven Bangladeshi nationals who were illegally staying and working in Kochi have been arrested, police said on Friday.