"I never really wanted to go anywhere else and I'm glad things are finally settled," Baynes told the club website.
"There was interest from a Football League club, but I have been at Wrexham a long time and wanted to see if I could secure my future here first."
Academy product Baynes started out at right back, making his senior debut against Chester City in November 2007 under former manager Brian Little.
Source: BBC Sport
Source: BBC Sport