The charm quark mass is one of the fundamental parameters of the Standard Model Lagrangian. In this work we present a determination of the M S ¯ MS¯¯¯¯¯ charm mass from a fit to the inclusive and charm HERA deep-inelastic structure function data. The analysis is performed within the xFitter framework, with structure functions computed in the FONLL general-mass scheme as implemented in APFEL. In the case of the FONLL-C scheme, we obtain m c ( m c ) = 1.335 ± 0.043(exp) − 0.000 + 0.019 (param) − 0.008 + 0.011 (mod) − 0.008 + 0.003 (th) GeV. We also perform an analogous determination in the fixed-flavor-number scheme at next-to-leading order, finding m c ( m c ) = 1.318 ± 0.054(exp) − 0.010 + 0.011 (param) − 0.004 + 0.015 (mod) − 0.004 + 0.045 (th) GeV, compatible with the FONLL-C value. Our results are consistent with previous determinations from DIS data as well as with the PDG world average.