The explosive device was found near the nursery school Junibacken, in the southern town of Växjö. Police say it could have injured people and damaged property.
Both suspects were questioned on wednesday, and then formally charged, suspected with probably cause. Both deny the charges. Both live in the local area, but neither has any connection to the school.
The police say there will be more questioning, and then the prosecutor will decide whether to ask a court to detain the two suspects.