Formal:
* Comment s'écrit votre nom? (How is your name spelled?)
* Pourriez-vous m'épeler votre nom, s'il vous plaît? (Could you spell your name for me, please?)
Informal:
* Comment on écrit ton nom? (How do you spell your name?)
* Peux-tu m'épeler ton nom? (Can you spell your name for me?)
You can also use a phrase like:
* Je ne suis pas sûr de savoir comment écrire votre nom. (I'm not sure how to spell your name.)
Bonus:
If you're unsure about the pronunciation of their name, you can ask:
* Comment prononcez-vous votre nom? (How do you pronounce your name?)
Remember that when asking for someone's name, it's always polite to be clear and respectful.