The Charlton keeper will provide competition for first-choice Mark Cousins.
Boss Joe Dunne told the club's official website: "I am very pleased to bring in John, and we've got some good competition for places now.
"That sort of competition is important for the squad and this will bring out the best in the players we already have.
"John is a very good goalkeeper who will compete with Mark for that place in the team, and hopefully it will see them push each other on in the time that he's with us at Colchester."
The 24-year-old has made eight appearances for the Addicks since signing permanently in 2011 from Millwall, after initially joining the club on a loan deal.