We present a comparative ab initio computational study of sodium and lithium storage in amorphous (glassy) carbon (a-C) vs. graphite. Amorphous structures are obtained by fitting stochastically generated structures to a reference radial distribution function. Li insertion is thermodynamically favored in both graphite and a-C. While sodium insertion is thermodynamically unfavored in graphite, a-C possesses multiple insertion sites with binding energies stronger than Na cohesive energy, making it usable as anode material for Na-ion batteries.