Different ways of how to clear Console Window in Chrome

There are number of ways how to clear Console window in Chrome:

  1. console.clear() or just clear() method
console.clear()

Notice that in order for this command to work you have to have ‘Preserve log’ unchecked. If it checked and you use console.clear() or clear() command it will not clear your console window.

console.clear() or clear() doesn’t clear windows when ‘Preserve log’ is checked

2. Use shortcut key Ctrl + L (on Windows). Notice that this shortcut clears console window if either “Preserve log” is checked or unchecked.

3. Use clear icon in the toolbar. Notice that this clicking on it clears console windows if either “Preserve log” is checked or unchecked

Clicking on ‘Clear’ icon will clear console window