All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
It is permissible for a man to chat with a man whom he does not know, and for a woman to chat with a woman whom she does not know if the discussion meets the Islamic pre-conditions and is free from prohibitions, like lying, backbiting, slandering, obscene words, and so forth.
As regards concealing one’s ID, if you mean that a person informs the one to whom he is speaking that his name is so and so, whereas in reality it is not his real name, then this is a lie and it is forbidden. However, if you mean that one uses a symbol for the speaker –as is the case in e-mail addresses –then this is permissible.
Nonetheless, we warn against what is spread in those chats, whereby a man chats with a non-Mahram woman, and a woman chats with a non-Mahram man, then this matter leads to many prohibitions as we clarified in Fataawa 85359, 84874 and 81671.
Allaah Knows best.