The Hartlepool-born player spent two years at Blundell Park but never made a first-team appearance as the Mariners suffered relegation from League Two last month.
During his time at Grimsby, Painter had a loan spell at Northern Premier League South East side Spalding United before the season was cut short due to the Covid-19 pandemic.
Following his return to the North East earlier this year, Painter trained with Spartans and now becomes boss Michael Nelson’s 15th signing of the summer.
The 19-year-old said: “I’m absolutely delighted to finally get it done.
“He (Michael Nelson) tried to get me in on loan at the beginning of last season but nothing materialised. For it to happen now - I’m really pleased.
“It has been great training with the club over the last few months. It shows they really wanted me, so I was keen to sign as soon as possible.
“It’s nice to be wanted again. It’s also key that I play at a good level at a young age."
As a relatively unknown signing to Blyth supporters, Painter is determined to repay the faith show in him by Nelson and co.
He added: “I’d say I’m a bit old fashioned central midfielder.
“I’m box-to-box and love big tackles but I hope I can chip in with goals and assists.
“I like to get the fans off their seats and please them.
“I want to prove myself to the management and repay the faith they’ve put in me.”