Skip to main content

isChrome()

true when the current environment is Google Chrome — or any browser built directly on Chromium (Chrome Beta, Canary, Brave, Vivaldi, …) — but not Chromium-Edge or Opera.

Signature(options?: DetectOptions) => boolean
Tree-shakes to~400 bytes if imported alone
ExcludesEdge, Opera, Firefox-on-iOS, Safari, IE

Matches

  • Desktop Chrome — Chrome/ token with navigator.vendor === 'Google Inc.' (or window.chrome global as a UA-spoof backstop).
  • Chrome iOS — CriOS/ token.
  • Pure Chromium — Chromium/ token (Brave, Vivaldi, etc.).

Excludes UAs containing Edge/, Edg/, EdgA/, EdgiOS/, Opera, or OPR/.

Examples

import { isChrome } from 'get-browser';

if (isChrome()) {
// safe to use Chrome-only APIs guarded by feature checks
enableChromeFeature();
}
Pure-Chromium fingerprint

Chrome/-with-Apple-vendor on iOS is not desktop Chrome — it's Chrome iOS, which uses WebKit under the hood. isChrome() returns true for both, but they have very different capabilities.

See also

  • isEdge() — Chromium-Edge is not Chrome.
  • isOpera() — Chromium-Opera is not Chrome.
  • detect() — single canonical answer instead of N booleans.