Purpose: To introduce a method for optimizing the bow‐tie filter (BTF) shape in CBCT to achieve the maximum image contrast and minimum image noise relative to the patient dose. Materials and Methods: The proposed method finds the BTF shape that minimizes an objective function that accounts for dose delivered by the CBCT scan, image noise and contrast. The BTF shape, constant for all projections, is described by parallel translation of a curve, represented by few (4–8) drive points. The objective function combines dose and contrast‐to‐noise ratio at the central slice, reconstructed by filtered backprojection. Dose and projection data can be computed either by analytical model or by the Monte Carlo method. Nelder‐Mead optimization is used to find the set of drive point coordinates that minimizes the objective function. Results: The method was applied for two cylindrical water phantoms of diameters of 18 cm and 22 cm. The computation time for MC‐based optimization was four hours, mainly spent on MC calculations. We currently investigate how the (time‐dependent) MC statistical fluctuation affects the convergence of the process. The convergence also does not depend on the selection of the drive points that describe the BTF shape, however the convergence is not achieved when the objective function is not sensitive to location of one or more drive points. Conclusions: Our method is an important tool for improving the trade‐off between dose and image quality in CBCT. Describing the BTF shape description by a few drive points simplifies the problem and makes it solvable by a simple optimization method, while coupling the optimization code with the MC simulator gives the possibility of realistic modeling of the CBCT unit, at the expense of increased computation time. This work was supported by a research grant provided by Varian Medical Systems.