Our research is devoted to developing a methylcellulose (MC) based in situ gelling ophthalmic formulation using pilocarpine hydrochloride as a model drug, containing different proportions of i (iota)-carrageenan and potassium chloride. This study will evaluate the utility of the proposed formulation to be a substitute for traditional eye drops. Use of both i-carrageenan and potassium chloride of definite wt% effectively reduces the gel temperature of the virgin MC solution from 60 °C to 33.5 °C which is below physiological temperature. The conventional methods like test tube tilting, and viscosity measurements are used to determine the gelation temperature while the gels are subjected to swelling as well as a gel dissolution study. Subsequently, the outcome from in vitro and in vivo studies confirms that the present system may be a better alternative compared to conventional eye drops. © The Royal Society of Chemistry 2015.