Supersonic nozzles are used in many applications such as propulsion systems, turbines, supersonic wind tunnels and mixing devices. One of the important challenges in designing this kind of nozzles is the extreme sensitivity of outlet condition to variations in profile geometry. The standard procedure to design supersonic nozzles which produces uniform outlet ?ows is based on the method of characteristics (MOC). In this method, the hyperbolic partial differential equations that govern the isentropic supersonic ?ow are reduced to ordinary differential equations along so-called characteristic lines which emanate from a given initial line. Moreover, this method has limitations, including disability in development for viscous flow, impossibility of adding a constraint such as minimum length, not designing the convergence part of nozzle and having assumption of perfect gas without phase changes. Methods of optimization are used to eliminate these limitations in design of supersonic nozzle. One of these methods is adjoint equations. This method has been used for the external flow frequently and it has not been used for internal flow yet. The purpose of this research is to use adjoint method to optimize the shape of supersonic nozzle to achieve maximum uniformity at the nozzle exit. Firstly, in order to obtain the accuracy of this method for different cost functions and initial guesses, an inverse design problem is solved. It is shown that in this case the cost function cannot be defined on the outlet boundary. Also, it is demonstrated that the velocity and density cannot be used in defining the cost function. Consequently, cost function should be defined only with pressure and geometric parameters. In addition, changing the initial guess doesn’t have an effect on the final results. Examining the various cost functions on the solid wall and symmetry boundaries, proper function is obtained. This function is in the form of sum of minimum pressure gradient on the solid wall, reaching 80 percent of the nozzle length to outlet pressure on the symmetry boundary and fixing the height of the nozzle in the throat. It is observed that this method is able to reduce the amount of non-uniformity in the outlet of the nozzle. The non-uniformity obtained from the MOC is 2.2 percent and this value for adjoint method is 0.17. In this design, the length of the nozzle is 10 percent more than result of MOC. If the length of the nozzle is considered equal to length of MOC, the amount of non-uniformity Increases to 0.28 percent which is eight times less than the result of MOC. Aside from the point that mentioned above, this method is also used to reduce 10 percent of the length of the nozzle and the results are compared with the results of the genetic algorithm. It is observed that the adjoint method reduced the non-uniformity from 1 percent in genetic algorithm to 0.6 percent. Runtime is 12 hours and the number of iterations required for convergence is 4000. The problem is considered as inviscid, steady state and two-dimensional flow. Furthermore, the boundary conditions at the inlet is uniform and the gas is ideal Keywords: Optimization, Adjoint equation method, Supersonic nozzle, Internal flow