What Is My User Agent? (Browser and curl)
The Short Answer
Your User-Agent is a short text string your browser or HTTP client sends with every request to identify what it is. A browser sends something starting with Mozilla/5.0... describing the OS and engine; curl sends something like curl/8.7.1; Python's requests library sends python-requests/2.x. To see yours in the browser, open the User Agent decoder. To see it from a terminal, the one-liner is below.
See Your User-Agent in the Terminal
Echo back exactly what your client sends with the HTTP headers viewer endpoint:
curl -s https://hackmyip.com/api/ip | grep -i userIn the browser, the User Agent tool parses your string into browser, version, engine, and OS, and the HTTP Headers viewer shows the full set of headers your browser sends.
Why curl and a Browser Show Different Strings
The User-Agent is just a self-reported label, and every client picks its own. A browser advertises a long Mozilla/5.0 string for historical compatibility reasons; curl advertises its name and version; a bot may advertise anything (or nothing). This is also why HackMyIP can serve curl hackmyip.com as plain text but show a browser the full site — it reads the User-Agent and adapts. See the command-line IP guide for that behavior.
Why It Matters for Privacy
Your User-Agent is one input websites combine with others — screen size, fonts, timezone, canvas rendering — to build a browser fingerprint that can track you even without cookies. On its own a UA is not unique, but in combination it narrows you down. The newer Client Hints system breaks the UA into pieces sites must request explicitly; you can read more in browser fingerprinting explained. To see how identifiable your browser is overall, run the privacy checks and the fingerprint test.
Can I Change My User-Agent?
Yes. Browsers let you override it via dev tools or extensions, and any HTTP client lets you set it with a flag — for curl that is -A or --user-agent. Changing it can reduce one tracking signal, but on its own it rarely makes you anonymous, because the rest of your fingerprint stays the same. A spoofed UA that disagrees with the rest of your fingerprint can even stand out more.
Frequently Asked Questions
What is my user agent?
It is the identifying string your browser or HTTP client sends with each request, naming the software and often the OS and engine. Open the User Agent tool on HackMyIP to see and decode yours, or run a curl one-liner to print it from the terminal.
How do I see my user agent from curl?
curl sends its own User-Agent like curl/8.7.1. To set and reflect a custom one, use curl -A "my-agent/1.0" against a header-reflecting endpoint such as https://hackmyip.com/headers. The browser User Agent tool decodes a browser's string into parts.
Why is my browser's user agent different from curl's?
Because the User-Agent is self-reported and every client chooses its own. Browsers send a long Mozilla/5.0 string for compatibility; curl sends its name and version. Sites can serve different responses based on which one they see.
Does my user agent identify me?
Not by itself, but it is one signal in a browser fingerprint. Combined with screen size, fonts, timezone, and canvas data, it helps narrow you down even without cookies. Run the fingerprint test to see how identifiable your browser is.
Can I change or spoof my user agent?
Yes, via browser dev tools, an extension, or an HTTP client flag like curl's -A. It removes one signal, but the rest of your fingerprint stays the same, so it rarely makes you anonymous on its own, and a UA that mismatches the rest can be more conspicuous.