Grabham came through the ranks at his home region, graduating as a scrum half from Tondu RFC to the senior squad at the Ospreys via Bridgend District, the Eyasses and Bridgend Ravens.
His debut came in an LV= Cup defeat to Exeter Chiefs in October 2011 and he has now featured 34 times for the Ospreys, scoring five tries, with 15 of his appearances coming this season.
He has also gained international experience with Wales, captaining his country on the IRB Sevens World Series.
Andrew Millward, Rugby General Manager, said:
"It's very good news that Tom will continue to be part of the squad for the next couple of seasons. The coaches made the step, a few years ago now, of switching him from nine to the wing, and he showed some real initial promise a couple of years back. Some of the intricacies of the position needed refinement, but to Tom's credit he is a really good learner, is very diligent in everything he does, and he's gone away to look at all aspects of his game in order to understand the position fully, technically and tactically.
"He's now got a greater understanding of what is required from a winger at this level. He is learning how to make the kind of snap decisions that can change the outcome of games, and recently we've seen him become a big part of our attacking game.
"It's credit to him, and the way he goes about his day to day business at Llandarcy, that he has enjoyed his most prolific season yet as an Osprey, being selected on merit ahead of others for some big games. It's important he understands that his current selection, and this new contract, is only a reward for his work to date, and that he needs to continue striving for improvement instead of standing still. He's a good, young, professional with the potential for considerable growth, and it's great that the Ospreys will benefit."
Speaking after signing his contract, Grabham said:
"I'm really pleased to sign for another two years. The Ospreys is my home region and I'm looking forward to the future.
"The main goal for me over the next two years is just to pull on the jersey as much as I can. It's a competitive environment here and when you get the chance you've got to take it or you'll find yourself out of the side.
"It's an exciting time for the Ospreys, we are a young team but we're ambitious about what we can achieve over the next few seasons and I'm happy that I'll be a part of it."
Grabham follows Joe Bearman in committing his future to the Ospreys this week, after Jeff Hassler, Tyler Ardron and Justin Tipuric signed new contracts earlier this season. The Ospreys have also confirmed the return of Wales prop, Paul James, and the capture of former All Black scrum half, Brendon Leonard, both of whom will join up with the region next season.