Abstract-Reversible data hiding can recover the original image from the marked image without any distortion. This paper presents a novel prediction error based reversible data hiding method using histogram shifting in spatial domain. Three predictors including Mean, JPEG lossless and median edge detector (MED) are employed to compute prediction values for current pixels, respectively. Prediction errors are calculated as well to build histogram bins. Histogram shifting mechanism is designed that bins with large prediction errors are shifted based on hiding level, and thus, it will not hurt marked image if hiding level is not high. Histogram bins with small error predictions are used to hide secret data. Experimental results demonstrate that average of prediction error is less than that of interpolation error used in existing data hiding methods, and the proposed method is good at high capacity hiding. MED is the best predictor among three predictors in the proposed method, and it outperforms existing data hiding methods in terms of capacity and marked image quality.Index Terms-Reversible data hiding, histogram shifting, median edge detector, prediction error.