Formal:
* 您好,您的名字是? (Nín hǎo, nín de míngzi shì?) - This is the most formal way to ask someone's name. It literally translates to "Hello, your name is?".
* 请问,您的贵姓? (Qǐngwèn, nín de guìxìng?) - This is another formal way to ask for someone's surname. It literally translates to "May I ask, your honorable surname?"
Informal:
* 你好,你叫什么名字? (Nǐ hǎo, nǐ jiào shénme míngzi?) - This is a more casual way to ask someone's name. It literally translates to "Hello, what is your name?"
* 你好,你叫什么? (Nǐ hǎo, nǐ jiào shénme?) - This is even more informal and literally translates to "Hello, what do you call yourself?"
Note: In Chinese, the order of "hello" and "your name is" can be reversed. It's considered polite to first greet someone before asking their name.