どのように and どうやって are both question words used to to ask "how" to do something. But what is the difference between them? Actually, it's rare to see どのように in a written text. Can anyone show me how to use it?
2 Answers
The only difference between the two phrases is in their formality level.
どのように is more formal (and polite) than どうやって.
If you are familiar with the verb やる, you know that it is a casual/conversational verb. やって is a form of やる.
What is the verb that is more formal than やる but has the same meaning? It is する.
Thus, you can also say どのようにして to mean "how" as して is a form する.
する : やる = して: やって
Extra: This means that you can say どうして to mean "how" as well, but careful speakers tend to avoid using it because どうして can also mean "why".
どうやって and どのように are not exactly the same.
どのように is How? - どうやって is By what?
どうやって = どう (how) + やって (a continuative form of do).
どうやって is like asking for experience.
例:彼はどうやってここへ来たのですか。
How did he come here? = By what means did he come here?
In such case, you cannot use どのように
If you ask the way (the methods or tools) of doing something, you can use both 「どのように」and 「どうやって」.
例:これはどのように食べますか/ これはどうやって食べますか。
How can I eat this?
If you want to ask methods or tools which also have the meaning of "in what way". You must use どう or どのように.
例:「AとBはどう / どのように違いますか。」
In what way are A and B different?
In this case, you cannot use どうやって.