consolelog.tools

Browser Feature Detector

Test what YOUR browser supports across modern CSS, JavaScript and storage APIs — then pick the features you care about and generate copy-paste feature-detection code (a detection object, if/else guards, or @supports CSS) with fallback guidance. Feature detection, not user-agent sniffing.

About this ToolHow it works, benefits & use cases

Browser Feature Detector runs each detection check against the browser you are using right now — after the page mounts, client-side — and reports which modern web platform features it actually supports. The catalog covers 21 features in three groups: CSS (container queries, the :has() relational selector, subgrid, backdrop-filter, color-mix(), aspect-ratio), JS / Web APIs (IntersectionObserver, ResizeObserver, WebGL, WebGPU, Web Share, the async Clipboard API, getUserMedia, Service Worker, WebAuthn/passkeys, View Transitions, structuredClone, Array.prototype.at), and Storage (localStorage, IndexedDB, Cache API). Each feature shows a live Supported or Missing badge plus its support baseline year, and a running "X / total supported" summary tracks your browser overall. Tick the features you care about and the tool generates copy-paste, dependency-free detection code in three shapes: a detection object, if/else progressive-enhancement guards, or Modernizr-style HTML class toggles. When any CSS feature is selected, a separate @supports CSS snippet is generated too. Every generated check uses the same expression the live panel evaluated, and your selection and output format are saved in the URL for sharing. The point: detect capabilities, never sniff the user-agent string.

How to Use

  1. 1Let the page mount — each feature is tested live against your current browser automatically.
  2. 2Read the "X / total supported" summary and the per-feature Supported/Missing badges.
  3. 3Tick the CSS, JS / Web API and Storage features you want in your generated code (Select all / Clear help).
  4. 4Pick an output format: detection object, if/else guards, or HTML class toggles (Modernizr style).
  5. 5Copy, download or share the generated JS — plus the @supports CSS snippet when CSS features are selected.

Key Benefits

  • Live, client-side detection of 21 modern features run against your actual browser after mount
  • Per-feature Supported/Missing badges with baseline year, plus a running total-support summary
  • Three feature groups: CSS, JS / Web APIs and Storage
  • Three output shapes: detection object, progressive-enhancement guards, or Modernizr-style class toggles
  • Auto-generated @supports CSS snippet whenever a CSS feature is selected
  • Each generated check reuses the exact expression the live panel evaluated
  • Selected features and output format persist in a shareable URL

Common Use Cases

  • Confirming whether your browser supports a specific CSS or JS feature before relying on it
  • Generating a runtime detection object to gate progressive-enhancement code
  • Producing if/else guards so modern APIs run only where they exist, with a clean fallback
  • Shipping @supports CSS for features like :has(), subgrid or container queries with fallbacks
  • Sharing a reproducible feature-support snapshot and snippet with a teammate via URL

Your browser

Detecting…
  • Container queriesCSS · since 2023
  • :has() relational selectorCSS · since 2023
  • IntersectionObserverJS / Web APIs · since 2019
  • View Transitions APIJS / Web APIs · since 2024
  • Service WorkerJS / Web APIs · since 2018
  • localStorageStorage · since 2011

Vanilla JS, no dependencies — copy into your project

/**
 * Feature detection — generated by consolelog.tools
 * Detects 6 features at runtime.
 */

const features = {
  // Container queries — Style elements based on their container size instead of the viewport (@container).
  containerQueries: CSS.supports('container-type: inline-size'),
  // :has() relational selector — The "parent" selector — match elements that contain a given descendant.
  hasSelector: CSS.supports('selector(:has(*))'),
  // IntersectionObserver — Asynchronously observe when an element enters or leaves the viewport (lazy-loading, infinite scroll).
  intersectionObserver: 'IntersectionObserver' in window,
  // Service Worker — Background proxy worker powering offline support, caching and push (PWAs).
  serviceWorker: 'serviceWorker' in navigator,
  // View Transitions API — Animate between DOM states (and across documents) with a single API.
  viewTransitions: 'startViewTransition' in document,
  // localStorage — Synchronous key/value storage that persists across sessions (~5MB).
  localStorage: (() => { try { return typeof localStorage !== 'undefined'; } catch { return false; } })()
};

// Usage:
if (features.containerQueries) {
  // Container queries is supported.
}

export default features;

Progressive-enhancement CSS for the selected CSS features

/* Feature detection — generated by consolelog.tools */

/* Container queries — Style elements based on their container size instead of the viewport (@container). */
@supports (container-type: inline-size) {
  /* Enhanced styles when Container queries is supported. */
}
@supports not (container-type: inline-size) {
  /* Fallback styles for browsers without Container queries. */
}

/* :has() relational selector — The "parent" selector — match elements that contain a given descendant. */
@supports (selector(:has(*))) {
  /* Enhanced styles when :has() relational selector is supported. */
}
@supports not (selector(:has(*))) {
  /* Fallback styles for browsers without :has() relational selector. */
}

Feature catalog

CSS

Style elements based on their container size instead of the viewport (@container).

The "parent" selector — match elements that contain a given descendant.

Let a nested grid inherit the track sizing of its parent grid.

Apply blur/saturation effects to whatever sits behind an element (frosted glass).

Mix two colors in a given color space directly in CSS.

Reserve layout space at a fixed ratio without padding hacks.

JS / Web APIs

Asynchronously observe when an element enters or leaves the viewport (lazy-loading, infinite scroll).

React to element size changes without listening to window resize.

GPU-accelerated 2D/3D graphics in a <canvas>.

Modern low-level GPU API for compute and rendering, successor to WebGL.

Invoke the native OS share sheet from the web (mostly mobile).

Programmatic, promise-based read/write of the system clipboard.

Capture audio/video streams from the user’s camera and microphone.

Background proxy worker powering offline support, caching and push (PWAs).

Passwordless, phishing-resistant authentication with platform authenticators.

Animate between DOM states (and across documents) with a single API.

Deep-clone complex values (Maps, Sets, typed arrays) without JSON round-trips.

Relative indexing including negatives, e.g. arr.at(-1) for the last item.

Storage

Synchronous key/value storage that persists across sessions (~5MB).

Transactional, asynchronous client-side database for large structured data.

Programmatic request/response cache, typically paired with Service Workers.

Detect features, don’t sniff user agents

The live panel runs each detection expression against your current browser after the page mounts, so what you see is real — not a lookup table. Toggle features to build a tailored snippet.

Prefer feature detection ('IntersectionObserver' in window, CSS.supports('selector(:has(*))')) over parsing navigator.userAgent. UA strings lie, get spoofed, and break the moment a new browser version ships. Detecting the capability itself is the basis of progressive enhancement: ship a solid baseline, then layer modern APIs only where they actually exist — with @supports for CSS and runtime guards for JS.

Was this tool helpful?

Share Your Experience

Help others discover this tool!

Related tools