JavaScript Navigator userAgentData Property

Beginner
5 min read
Updated: Nov 2026
3 examples
Property

Definition

navigator.userAgentData is a read-only property that returns a NavigatorUAData object — the entry point to the User-Agent Client Hints API for structured browser / OS hints (MDN).

Read the notes below before you rely on this property. Prefer feature detection when support is limited.

Syntax

Use navigator.userAgentData. Start with this line.

JavaScript
navigator.userAgentData
CallWhat it does
navigator.userAgentDataPrimary signature.

Built into the browser. Read navigator.userAgentData on Navigator — no import required.

Library declarations
JavaScript
navigator.userAgentData

Parameters

ParameterDescription
getHighEntropyValues(hints)Optional. Async high-entropy dictionary

Return Value

Return ValueDescription
*NavigatorUAData

JavaScript Examples

Example 1 — Read brands

MDN’s beginner check: print the brand list when Client Hints exist.

JavaScript
if (!navigator.userAgentData) {
  console.log("userAgentData unavailable");
} else {
  console.log(navigator.userAgentData.brands);
}
Try It Yourself

How It Works

  1. Detect first. Safari / Firefox typically omit the property.
  2. Read brands. An array of { brand, version } objects (low entropy).
  3. GREASE brands. Lists may include intentional nonsense brands for anti-sniffing — do not hard-code one name.
  4. No network call. This property is synchronous once the object exists.

Example 2 — Low-Entropy Fields

Read mobile and platform together with brands.

JavaScript
const uaData = navigator.userAgentData;
if (!uaData) {
  console.log("userAgentData unavailable");
} else {
  console.log("mobile:", uaData.mobile);
  console.log("platform:", uaData.platform);
  console.log("brands:", uaData.brands.map((b) => b.brand).join(", "));
}
Try It Yourself

How It Works

  1. Cache the object. One read of userAgentData for several fields.
  2. mobile. Boolean hint for a mobile UA form factor.
  3. platform. Platform brand string (not the old navigator.platform format).
  4. Map brands. Useful for display; still not a feature-support API.

Example 3 — getHighEntropyValues()

Request higher-entropy hints asynchronously (MDN sample hints).

JavaScript
async function loadHints() {
  if (!navigator.userAgentData) {
    console.log("userAgentData unavailable");
    return;
  }
  const ua = await navigator.userAgentData.getHighEntropyValues([
    "architecture",
    "model",
    "platform",
    "platformVersion",
    "fullVersionList"
  ]);
  console.log(ua);
}

loadHints();
Try It Yourself

How It Works

  1. Detect first. Skip the call when Client Hints are missing.
  2. Pass hint names. Only request what you need — higher entropy is more identifying (MDN).
  3. Await the Promise. Gives the browser time for policy / permission checks.
  4. Handle sparse results. Some keys may be blank depending on browser and policy.

Browser Support

Navigator.userAgentData is part of User-Agent Client Hints. MDN marks it Experimental and Limited availability (not Baseline). Requires a secure context.

✓ Experimental · Limited availability

Navigator.userAgentData

Best support in Chromium-based browsers (Chrome, Edge, Opera). Missing or unavailable in Safari and Firefox. Always feature-detect.

Limited Not Baseline
Google Chrome Supported (Chromium)
Yes
Microsoft Edge Supported (Chromium)
Yes
Opera Supported (Chromium)
Yes
Mozilla Firefox Not supported
No
Apple Safari Not supported
No
Internet Explorer Not supported
No
userAgentData Chromium-first

Bottom line: Ship behind a feature detect. See the MDN userAgentData reference. Fall back to userAgent / capability checks.

Frequently Asked Questions

A NavigatorUAData object from the User-Agent Client Hints API. It exposes low-entropy brand, mobile, and platform hints, plus getHighEntropyValues() for more detailed (higher-entropy) data.
MDN marks it Experimental and Limited availability (not Baseline). It is not Deprecated or Non-standard. Always feature-detect and keep a fallback.
Yes. MDN lists it as a secure-context feature (HTTPS or localhost) in supporting browsers.
Low-entropy NavigatorUAData properties: brands is an array of {brand, version} objects, mobile is a boolean, and platform is a platform brand string.
An async method that requests higher-entropy hints (for example architecture, model, platformVersion, fullVersionList). It returns a Promise so the browser can run checks before revealing more identifying data.
Client Hints are a better-structured alternative to scraping the UA string — but support is still limited. Prefer feature detection for capabilities, and feature-detect userAgentData before relying on it.

Next: vendor

Learn how navigator.vendor reports the browser vendor string.

vendor tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

11 people found this page helpful