Sodium ion batteries are based on sodium based active materials selected among compounds of the general formula:AaMb(XY4)cZd,wherein A comprises sodium, M comprises one or more metals, comprising at least one metal which is capable of undergoing oxidation to a higher valence state, Z is OH or halogen, and XY4 represents phosphate or a similar group. The anode of the battery includes a carbon material that is capable of inserting sodium ions. The carbon anode cycles reversibly at a specific capacity greater than 100 mAh/g.