Context. In April 2013, the nearby TeV blazar, Mkn 421, showed one of the largest flares in X-rays in the past decade. Aims. We study all multiwavelength data available during MJD 56 392 to 56 403, with special emphasis on X-ray data to understand the underlying particle energy distribution. Methods. We studied the correlations between the UV and gamma-ray bands with the X-ray band using the z-transformed discrete correlation function. We modelled the underlying particle energy spectrum with a single population of electrons emitting synchrotron radiation, and statistically fitted the simultaneous time-resolved data from Swift-XRT and NuSTAR. Results. The flux varied rapidly in the X-ray band, with a minimum doubling timescale of 1.69 ± 0.13 h. There were no corresponding flares in UV and gamma-ray bands. The variability in UV and gamma rays was relatively modest with ∼8% and ∼16%, respectively, and no significant correlation was found with the X-ray light curve. The observed X-ray spectrum shows a clear curvature that can be fit by a log parabolic spectral form. This is best explained as originating from a log parabolic electron spectrum. However, a broken power law or a power law with an exponentially falling electron distribution cannot be ruled out either. Moreover, the excellent broadband spectrum from 0.3-79 keV allows us to make predictions of the UV flux. We find that this prediction is compatible with the observed flux during the low state in X-rays. However, during the X-ray flares, depending on the adopted model, the predicted flux is a factor of 2-50 lower than the observed one. This suggests that the X-ray flares are probably caused by a separate population that does not contribute significantly to the radiation at lower energies. Alternatively, the underlying particle spectrum can be much more complex than those explored in this work.