| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/en-US/docs/Web/API/console/clear_static | [Back] [Original] |
Get to know MDN better
This feature is well established and works across many devices and browser versions. Its been available across browsers since July 2015.
The console.clear() static method clears the console if possible.
A graphical console, like those in web browsers, will remove all previous messages; a console displaying on a terminal, like the one in Node.js, will attempt to clear it using an escape code or system API; otherwise the method will have no effect (and no error).
console.clear()
None.
None (undefined).
| Specification |
|---|
| Console # clear |
console.clear()console.clear()console.clear()This page was last modified on Jul 4, 2025 by MDN contributors.
Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |