Introduction: In the present study, formulation and evaluation of floating oral in situ gelling system of ranitidine was investigated using various polymers. Material and Method: The objective of the present research study was to formulate, develop, and optimize in situ gelling systems for oral administration. The development of in situ gelling systems has received considerable attention over the past few years. Result: In situ gel forming drug delivery systems are principle, capable of releasing drug in a sustained manner maintaining relatively constant plasma profiles. The drug content was found to being the range of 95–102% for all the formulations indicating uniform distribution of drug. Ranitidine was chosen as the model candidate for the development of oral in situ gel, since them possesses near ideal characteristics that these drugs must have formulating sustained drug delivery system. Conclusion: The results of study demonstrate that xanthan gum was suitable to develop sustained release oral in situ gels.