A convicted sex offender is back behind bars after witnesses stopped him from kidnapping a young boy, then restrained him until police arrived.