Synchronous oscillations in neuronal ensembles have been proposed to provide a neural basis for the information processes in the brain. In this work, we present a neuromorphic computing algorithm based on oscillator synchronization in a critical regime. The algorithm uses the high dimensional transient dynamics perturbed by an input and translates it into proper output stream. One of the benefits of adopting coupled phase oscillators as neuromorphic elements is that the synchrony among oscillators can be finely tuned at a critical state. Especially near a critical state, the marginally synchronized oscillators operate with high efficiency and maintain better computing performances. We also show that explosive synchronization which is induced from specific neuronal connectivity produces more improved and stable outputs. This work provides a systematic way to encode computing in a large size coupled oscillators, which may be useful in designing neuromorphic devices.