Can I write alright instead of all right?
It depends on the situation.
Many people unite the phrase all right as one word “alright.” No such word exists in formal usage, so don’t write ‘alright’ unless you mean to be informal or slangy. If you are writing a term paper or a letter of application for a job, you had better spell it ‘all right’.
Alright is possible in an informal style. In a formal style, write all right.
‘John is alright,’ said his mother.
I felt perfectly all right after the cosmetic procedure.
In an informal style, you can also use okay or O.K instead of alright or all right.