"I'm sorry. It's okay."
Although that's technically correct because you're using the correct words, you're mixing both levels of formality, so your grammar is incorrect.
미안해 is the "declarative present informal low" form of the informal word for sorry
죄송합니다 is the "declarative present formal high" form of the formal word for sorry
It's dictionary form is "괜찮아다" meaning that this verb will always have a "ㅎ" after "ㄴ" If you are asking why it was formed that way when Hangul was made. My best guess is that the verb's pronunciation at the time was more breathy in-between the "ㄴ" and "ㅏ" than it would be pronounced if you left the "ㅎ" out. Either way, its the way its spelled so you CAN leave it out...it would just be spelled wrong :)
죄송하다 implies more respect. Ex: 미안해 is the informal conjugation and is used often with friends. 죄송해 makes no sense (even if it's correct conjugation), because it mixes showing respect together with extreme informality.
Literally 죄송하다 is "罪悚"하다. 罪 means crime/sin and 悚 means regret.
And 미안하다 is "未安"하다. 未 apparently means "not yet" and 安 means peaceful/tranquil/quiet