Open the Developer Console in your browser with the usual shortcut: F12 on Windows and Linux, or Command+Option+J on Mac. In Chrome, Edge, and most Chromium-based browsers, that opens the Console directly; in Firefox, the console shortcut is usually Control+Shift+K on Windows and Linux, or Command+Option+K on Mac.
Chrome and Edge
In Chrome or Edge, you can also open the browser menu, go to More tools or Developer tools , and then select the Console tab. On Mac, Command+Option+J is the quickest way to jump straight to it.
Firefox
Firefox uses a slightly different path. Open the menu, choose Web Developer or Browser Tools , then select Web Console , or use the keyboard shortcut for faster access.
Safari
Safari needs one extra step before the console is available. Open Settings or Preferences , go to Advanced , and enable the Develop menu, then use Develop > Show JavaScript Console or the shortcut Option+Command+C.
What to do in the console
Once it opens, you can type JavaScript commands and press Enter to run them. If you need multiple lines, use Shift+Enter.
If it does not open
If the shortcut does nothing, check whether the browser window is focused, whether a laptop function key needs Fn , and whether your browser uses a different shortcut mapping. Safari users should also confirm that the Develop menu is enabled first.
