Let see an example of a user-agent string
Mozilla/5.0 (Linux; Android 7.1.1; TONE-m17) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.89 Mobile Safari/537.36
This is a typical user-agent string whose content is combined of 4 parts
Mozilla/5.0 (Linux; Android 7.1.1; TONE-m17): Mozilla compatibility and OS detail (android, MacOS, iOS, Linux, ...)
AppleWebKit/537.36 (KHTML, like Gecko): web dev platform and its detail
Chrome/76.0.3809.89: browser name and version
Mobile Safari/537.36: safari browser sniffing, added for historical reason
If you want to know user's browser name and device information, you might only want to look at the latter (in parenthesis) of the first part (
Linux; Android 7.1.1; TONE-m17) and the third part (
Chrome/76.0.3809.89) in the above partition.
In the example we are considering, the user is using Chrome version 76.0 in Android 7.1.1 (Nougat)
This service helps you parse the user-agent string automatically.