The 28-year-old, released by Barnsley at the end of last season, becomes Huddersfield’s fifth summer signing.
“I’m very happy that Martin has joined the club for the 2015/16 season,” manager Chris Powell told the club’s official website.
“I think he fits the bill for us, as he has great know-how of the division and can play all across the back four, with his strongest position being centre-back.
“He will strengthen our defensive options and add real depth for the defensive positions in my team.
“We have a good balance in our signings of Dean Whitehead, Jason Davidson, Kyle Dempsey, Jordy Hiwula and now Martin, so I’m really pleased with how the squad is taking shape.”
Cranie progressed through Southampton’s academy and made 25 first-team appearances for the club before joining Portsmouth in 2007.
He moved on to Coventry in 2009 and signed for Barnsley in the summer of 2012, while he has had loan spells at Bournemouth, Yeovil, QPR and Charlton.