The ideal concentration of nitric acid HNO3 to prepare p-nitroaniline from aniline while maintaining optimal yield and avoiding unwanted by-products is typically around 50-60%. This is because a lower concentration of nitric acid may result in incomplete nitration, while a higher concentration may lead to over-nitration and the formation of unwanted by-products. Additionally, it is important to use a nitrating mixture, such as a combination of nitric acid and sulfuric acid H2SO4 , to control the reaction rate and ensure the formation of the desired p-nitroaniline product.