Yes — using a pen name is completely legal and very common.
Just ensure:
- You publish under the pen name consistently
- You keep legal contracts and royalty accounts in your real name
- You clearly state the legal identity behind the name if needed (e.g., for copyright registration)
Pen names give you privacy, creative flexibility, or branding freedom.