Your analytics show a spike of visits at 3 a.m., or your server log shows one visitor reading four hundred pages in a minute, and the question is simple: was that a person or a program? The user agent string is the first place to look, because well-behaved crawlers name themselves in it. It is also a place that can lie to you, because the string is written by the visitor, not verified by anyone.

This guide shows how to check a suspicious string with the free User Agent Parser on Ovatly, whose token rules cover major bots as well as browsers. It is equally direct about the limit: a user agent is self-declared text, so what you get is a signal to weigh with other evidence, never a verdict on its own.

Contents

  • Quick answer
  • Why honest bots name themselves
  • What the parser reports for a bot string
  • How to check a suspicious string, step by step
  • Worked example: a browser string that proves nothing
  • The spoofing problem
  • Limitations
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

Paste the suspicious string into the User Agent Parser and read the breakdown. The parser's token rules include major bots, so a string from a known crawler comes back identified as that bot, with the browser, engine and operating system fields reflecting what the string actually describes. If the string instead parses as an ordinary browser, that tells you only what the visitor claimed to be. A bot can copy a browser's string exactly, so a clean browser result is the absence of a confession, not evidence of a human.

Why honest bots name themselves

Crawlers that follow the conventions of the web identify themselves on purpose. A search engine's crawler wants site owners to recognise it in their logs, to tell its visits apart from human traffic in analytics, and to know who to contact or allow if there is a problem. So its user agent string carries a bot token: a name that announces an automated client rather than a browser.

That convention is what makes the user agent useful for this job at all. You are not detecting bots by cleverness; you are reading a label the bot chose to wear. The parser's job is to know those labels. Its token rules, maintained on the page itself rather than borrowed from a third-party library, cover the major browsers and major bots, checked in an order that reflects the string's history, so a bot token is matched as a bot rather than as one of the browsers its string may also mention for compatibility.

What the parser reports for a bot string

For a browser string, the parser reports browser and version, engine, operating system and device type. For a string from a known bot, the breakdown names the bot, because the bot token is the identifying token in that string. Either way, the parser reports what the string says, and shows Unknown for anything it cannot match rather than guessing it into a wrong match. The same discipline applies to automated clients: an unrecognised string is reported honestly, not forced into the nearest known name.

That honesty cuts both ways. The parser reads text. It cannot see the software that sent the text, only the text the software chose to send.

How to check a suspicious string, step by step

  1. Pull the exact user agent string from the log line or analytics row that caught your eye. Copy it whole; a trimmed string may lose the bot token.
  2. Open the User Agent Parser and paste the string in.
  3. Read the breakdown. If it names a bot, the visitor declared itself automated, and you can treat that row as crawler traffic with reasonable confidence.
  4. If it names a browser, record the claim, not a conclusion: browser and version, operating system and device type, as claimed.
  5. Weigh the claim against what the visitor did. Volume, speed, timing and which pages were requested are evidence the user agent cannot fake as easily as its own label.

Worked example: a browser string that proves nothing

Consider the example string from the tool's own documentation:

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

The parser reports browser Chrome 120.0.0.0, engine Blink, operating system Windows 10 / 11, device Desktop. If that string arrives once, from a visitor who reads three pages and leaves, it is unremarkable. If the identical string arrives ten thousand times in an hour, the parsed result does not change, and it does not rescue you: the string is a perfect copy of a real Chrome string, and any script can send a perfect copy. The parser has done its job correctly by reporting the claim. The bot conclusion, in that case, comes from the behaviour, not the label.

The contrast is the honest crawler. Its string carries its bot token, the parser names it, and the same ten thousand visits are explained in one step. Same tool, same fields, two completely different strengths of evidence, decided entirely by whether the visitor chose to declare itself.

The spoofing problem

A user agent is a claim the client makes, and it can be spoofed. That sentence is printed in the tool's own steps, and it is the most important fact in this guide. Nothing in the string is verified. There is no signature, no handshake, no check that the software sending the string is the software the string describes. Changing a user agent is a one-line setting in most HTTP libraries and a menu option in many browsers.

So the logic only runs in one direction. A bot token in the string is meaningful, because there is rarely a reason for a human's browser to claim to be a crawler. A browser token proves almost nothing, because there are many reasons for a script to claim to be Chrome. Modern browsers add a further wrinkle: they reduce the detail in their strings on purpose, so even genuine strings say less than they used to, and the gap between a real string and a copied one narrows.

Limitations

Treat results as a good indication, never as proof. That is the tool's own note, and it defines what this method can do. It can sort declared crawlers out of your analytics, confirm that a log row came from a client claiming to be a known bot, and clean up support investigations. It cannot certify that any given visit was human, and it cannot catch an automated visitor that copies a browser string and behaves gently.

Coverage is finite too. The token rules name the major bots; a new, small or deliberately obscure crawler may parse as Unknown, or as whatever browser its string imitates. Unknown is the parser being honest, and it should prompt you to look at behaviour and request patterns rather than to guess.

Common mistakes

  • Treating a browser result as proof of a human. The string is self-declared. A Chrome result means the visitor claimed to be Chrome, full stop.
  • Blocking or trusting on the user agent alone. Acting on one unverified signal will eventually punish a real visitor with an unusual string, or wave through a bot with a copied one.
  • Assuming every bot declares itself. Declaring is a convention followed by well-behaved crawlers. Scrapers and abusive bots often do the opposite.
  • Reading only the browser field. For this job the whole breakdown matters: a claimed desktop browser string attached to data centre traffic patterns is a contradiction worth more than either fact alone.

FAQs

Does the parser detect bots as well as browsers? Yes. Parsing uses the page's own token rules, which cover Edge, Opera, Samsung Internet, Chrome, Firefox, Safari, Internet Explorer and major bots, so a known crawler's string is reported as that bot.

If the parser says Chrome, does that prove a human visited? No. A user agent is self-reported and trivially faked, so a bot can send a perfect Chrome string. The parser reports what the string claims, not what actually sent it.

What does the parser show for a bot it does not know? Unknown, or whatever browser the string claims to be. Unknown or future clients show as Unknown rather than being guessed into a wrong match, and a spoofed string parses as the thing it imitates.

Why would a bot declare itself honestly in its user agent? Well-behaved crawlers identify themselves so site owners can recognise them in logs and analytics, and so their visits are not mistaken for human traffic. Declaring is a convention, not a technical requirement, which is why not every bot does it.

Is the user agent string I paste sent anywhere? No. Parsing happens locally on the page, so the strings you check are not uploaded.

Conclusion

A user agent string answers the bot question only when the bot cooperates: known crawlers name themselves, the parser's rules recognise the name, and the breakdown tells you what visited. When the string claims to be a browser, believe the claim exactly as far as it goes, and let behaviour carry the rest of the judgement. If you first need to read an ordinary string properly, browser, version and operating system, start with the companion guide on how to identify a browser and OS from a user agent. More tools and guides like this one live in the developer tools guides archive.