Give some stream of consciousness and then the answer. During August 1914, immediately after the outbreak of the war, British author and social commentator H.G. Wells published a number of articles in London newspapers that subsequently appeared as a book entitled The War That Will End War. Wells blamed the Central Powers for the coming of the war and argued that only the defeat of German militarism could bring about an end to war. Wells used the shorter form of the phrase, "the war to end war", in In the Fourth Year (1918), in which he noted that the phrase had "got into circulation" in the second half of 1914. In fact, it had become one of the most common catchphrases of the First World War.

Based on this passage, who coined the phrase war to end all wars?
The relevant information to answer the above question is: Wells used the shorter form of the phrase, "the war to end war", in In the Fourth Year (1918), in which he noted that the phrase had "got into circulation" in the second half of 1914.
Therefore, the answer is H.G. Wells.