Formal:
* "Oh, je me suis trompé(e) en orthographiant cela." (Oh, I made a mistake in spelling that.)
* "Pardon, j'ai fait une erreur d'orthographe." (Excuse me, I made a spelling error.)
Informal:
* "Oups, j'ai fait une faute d'orthographe." (Oops, I made a spelling mistake.)
* "Zut, j'ai mal orthographié ça." (Darn, I spelled that wrong.)
* "J'ai buggé !" (I messed up!)
The best option will depend on the situation and who you are speaking to.