What is a user agent, and what does it tell websites?

A user agent is the line of text your browser sends to every site to say what it is. How to read one, why sites check it, and what changing it does.

Updated 16 November 2026 6 min read

Every time your browser asks a website for a page, it introduces itself. The introduction is one line of text called the user agent, and it says roughly what browser you are using and on what kind of device. Sites use that line to decide what to send back. This article explains how to read a user agent, why it looks so strange, what sites do with it, and what happens when you change it.

What a user agent is

A request for a web page comes with a few lines of information called headers. One of them is named User-Agent. Your browser fills it in on its own, on every request, to every site. Scripts running on a page can read the same text.

The idea is as old as the web: tell the server what kind of program is asking, so it can answer in a way that program understands. In practice the line answers three questions. Which browser is this? Which version? What is it running on?

How to read one

Here is the kind of line a desktop browser sends:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:128.0) Gecko/20100101 Firefox/128.0

It looks like nonsense until you take it apart.

PartWhat it means
Mozilla/5.0A historical token. Nearly every browser sends it, so it tells a site nothing.
(Macintosh; Intel Mac OS X 10.15; rv:128.0)The platform: a Mac. The system version shown here is frozen at an old number on purpose, and does not reveal the real one.
Gecko/20100101Another compatibility token. The date in it has not changed in years.
Firefox/128.0The useful part: the browser's name and version.

The clutter has a history. In the 1990s, sites began sending their best pages only to browsers whose user agent contained a certain word. Other browsers responded by adding that word to their own. Then it happened again with the next word. Decades later, most user agents carry a pile of tokens that exist only so that old checks keep passing. A phone's user agent adds the word Mobile and often the device model.

Why websites look at it

  • To choose a layout. Some sites send a different page to phones than to computers.
  • To offer the right download. A download page shows the Mac version to Mac users.
  • To work around bugs. A site may avoid a feature in a browser version known to handle it badly.
  • To count. Statistics about which browsers visit a site come from this line.
  • To sort people from programs. Search engine crawlers and command-line tools announce themselves here, and sites treat them differently.

Reading the user agent to make decisions is called sniffing, and it has a poor reputation among web developers. The text is easy to get wrong, it changes with every release, and any visitor can send whatever they like. The better practice is to test whether a feature works, not to guess from the browser's name. Plenty of sites sniff anyway.

A user agent is also a tracking signal

A detailed user agent narrows down who you might be. On its own it is shared with many other people, but combined with your screen size, time zone, fonts and other details, it helps make a browser fingerprint.

Browser makers have responded by saying less. Many now freeze parts of the line, such as the exact operating system version, which is why the Mac in the example claims a system from years ago. Some browsers have also added a newer mechanism called client hints: the browser sends a short, low-detail description by default, and a site that needs more, such as the exact device model, has to ask for it. Not every browser sends client hints, so sites cannot rely on them alone.

What changes when you change it

You can tell your browser to send a different user agent. There are good reasons to:

  • Testing your own site. See which layout it sends to a phone or to another browser without picking up another device.
  • Getting past a wrong guess. A site that says "your browser is not supported" based on the name alone will often work fine once the name changes.
  • Asking for the other version. Request the desktop page on a tablet, or the mobile page on a computer.

There are also ways it goes wrong. The site believes the new line and may send code written for that other browser, so menus, video or sign-in can break. And the rest of your browser still tells the truth. A user agent that says "phone" from a browser with a 27-inch window and a mouse is an unusual combination, and unusual is the opposite of blending in. Changing the user agent is a testing and compatibility tool. It does not hide you.

How Vela handles user agents

By default Vela sends a mainstream Safari user agent, so sites answer with their standard pages. You can change that in two places.

  • For the whole browser. On the Mac, open Settings → Network and use Identify as under User Agent. The list is grouped into phones, tablets and desktop browsers, with more than ninety choices, and the change applies to open tabs straight away. On iPhone and iPad the same list is in the menu, under Privacy & Network → User Agent.
  • For one profile. Each profile can have its own user agent, set in the profile editor. A profile's own user agent overrides the global one, so a testing profile can look like a phone while your everyday profile stays on the default.

When you pick a phone or a tablet, Vela also asks sites for the mobile version of the page, so the layout you get matches the identity you chose. If fingerprint protection is on, the other details it reports, such as the platform, follow the chosen user agent and stay consistent with it. If you use Real Browser mode, leave the user agent on Default.

The steps for Mac, iPhone and iPad are in how to change the user agent in Vela.

Questions, answered.

Can a website see my user agent?

Yes. Your browser sends it with every request, and scripts on the page can read it as well. It is one of the first things a site learns about a visitor.

Does changing my user agent make me anonymous?

No. It changes one line of text. Your network address stays the same, and the many other details a browser reveals can still identify it or contradict the new line.

Why does every user agent start with Mozilla/5.0?

It is a leftover from the 1990s, when sites checked for that word before sending their full pages. Browsers kept it so that old checks would keep working, and it no longer says anything about the browser.

Why does a site show me the mobile version on my computer?

Usually because it decided from the user agent, or from the window size, that you are on a phone. Check which user agent your browser is set to send and switch it back to the default.

Is it safe to change the user agent?

It is harmless to your device, but it can break pages, because the site may send code meant for a different browser. Change it for a specific task and set it back to the default afterwards.

Keep reading.

All articles
Profiles & network

How to change the user agent in Vela

Test a mobile layout on your Mac, ask for the desktop site on iPhone, or set a user agent per profile.

5 minMac · iPhone · iPad
How the web works

What is browser fingerprinting, and can you stop it?

How websites recognize a device without cookies, and what each kind of protection gives up in return.

7 minBlog
Privacy

How to turn on fingerprint protection in Vela

Show websites a consistent, made-up fingerprint instead of your device's real one, then re-randomize it and test it.

5 minMac · iPhone · iPad