In Chicago Manual of Style, they recommend spelling it out.
"At five foot one, he was as thin as a rail."
In some cases a hyphen may help avoid ambiguity. If it's being used as an adjective, you might add hyphens. "His five-foot-two-inch body was thin as a rail."
You can use numbers if you prefer—"He was 5'2" and small for his age"—no spaces, and be sure to add the mark for inches. There's no absolute right or wrong here. Styles vary with different publishers. The main thing is to be consistent within your story. Don't spell it out in one place and use numbers somewhere else.