Aim: The main of our study is to formulate and evaluate the in situ gel of ofloxacin. Materials and Methods: The gift sample of drug was procured from Century Pharmaceuticals Limited Halol, Gujarat, India. The drug was identified by ultraviolet, infrared (IR), solubility, and on the basis of melting point. For the incompatibility studies, a drug-excipient study was performed. For the preparation of in situ gel of ofloxacin, Calcium carbonate (CaCO3), 0.1N HCl, and trisodium citrate were used. Now make solution of propylparaben and Methylparaben in purified Water in ration of 9:1 with aspartame. Now, different concentrations of HPMC-K 4 M, HPMC-K 15 M, and HPMC-K 100 M were added in respective batches. These solutions were mixed with the above solutions. The resulting alginate in situ gel solution containing ofloxacin was checked for lag time, viscosity, and amp, gelling property. Results and Discussion: Melting point was found to be 254â€“260Â°C. IR spectra of ofloxacin showed C=O, N-H, C-F, and O-H stretching which is similar to the standard drug sample. On the basis of results, P8 formulation was found to be best in respect of visual inspection, pH, viscosity, in vitro floating study, in vitro gelation study, determination of drug content, and in vitro drug release. Conclusion: In our experiment it is observed that if the final concentration of CaCO3 increases then it decreases the lag time for floating and if increase the concentration of sodium alginate and HPMC K4M the viscosity increases. It is proved by seeing all the results that ofloxacin in situ gel formulation has better performance than conventional formulation and also makes better compliance and improved efficacy.