ConsoleBaseline · Widely available
The console API logs debugging messages to the browser development tools' console.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jul 29, 2015. Widely available since Jan 29, 2018.
Browser support
DesktopChrome
1+Supportedsince Dec 11, 2008
Current: 155Edge
12+Supportedsince Jul 29, 2015
Current: 154Firefox
1–3.6Not supported
4+Supportedsince Mar 22, 2011
Current: 157Safari
1–2Not supported
3+Supportedsince Oct 26, 2007
Current: 27MobileChrome Android
18+Supportedsince Jun 27, 2012
Current: 155Firefox Android
4+Supportedsince Mar 29, 2011
Current: 157Safari iOS
1+Supportedsince Jun 29, 2007
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: console.
Feature detection
JS · check before using
if ("console" in globalThis) {
// console is available
} else {
// load a polyfill or use a fallback
}Sub-features
Support for each part of the feature (22). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| console | 1 | 12 | 4 | 3 | 18 | 4 | 1 |
| console.assert_static | 2 | 12 | 28 | 4 | 18 | 28 | 3.2 |
| console.clear_static | 25 | 12 | 39 | 7 | 25 | 39 | 7 |
| console.countReset_static | 68 | 79 | 62 | 13 | 68 | 62 | 13 |
| console.count_static | 2 | 12 | 30 | 4 | 18 | 30 | 3.2 |
| console.debug_static | 2 | 12 | 5 | 4 | 18 | 5 | 3.2 |
| console.dir_static | 2 | 12 | 8 | 4 | 18 | 8 | 3.2 |
| console.dirxml_static | 2 | 12 | 39 | 4 | 18 | 39 | 3.2 |
| console.error_static | 1 | 12 | 4 | 3 | 18 | 4 | 1 |
| console.groupCollapsed_static | 6 | 12 | 9 | 5.1 | 18 | 9 | 5 |
| console.groupEnd_static | 2 | 12 | 9 | 4 | 18 | 9 | 3.2 |
| console.group_static | 2 | 12 | 9 | 4 | 18 | 9 | 3.2 |
| console.info_static | 1 | 12 | 4 | 3 | 18 | 4 | 1 |
| console.log_static | 1 | 12 | 4 | 3 | 18 | 4 | 1 |
| console.substitution_strings | 1 | 12 | 9 | 3 | 18 | 9 | 1 |
| console.table_static | 27 | 13 | 34 | 7 | 27 | 34 | 7 |
| console.timeEnd_static | 2 | 12 | 10 | 4 | 18 | 10 | 3.2 |
| console.timeLog_static | 71 | 79 | 62 | 13 | 71 | 62 | 13 |
| console.time_static | 2 | 12 | 10 | 4 | 18 | 10 | 3.2 |
| console.trace_static | 2 | 12 | 6 | 4 | 18 | 6 | 3.2 |
Show 2 more
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| console.warn_static | 1 | 12 | 4 | 3 | 18 | 4 | 1 |
| console.worker_support | 31 | 12 | 29 | 7 | 31 | 29 | 7 |