A list of useful Google Chrome command line switches - gHacks Tech News

A list of useful Google Chrome command line switches

Chrome supports hundreds of different command line switches that may add features to the browser, change how features work, or remove features from it.

Some switches are only useful to developers, as they enable them to test certain features in Chrome, while others have practical uses that users of the web browser will appreciate as well.

The following list highlights important Chrome command line switches for users of the browser.

Before that, I'd like to walk you through the configuration process that explains how you can add one or multiple command line switches to the Chrome browser.

Note: The guide explains how this is done on Windows only.

Adding command line switches to Chrome

chrome command line switches

You have two main options to do so. First, you can open the Windows command line, change the directory to the Chrome directory, and run commands using chrome.exe  followed by the commands that you want to run. An example would be the following command executed in the Chrome application directory on the system.

chrome.exe --reset-variation-state

The easiest way to do so is the following way:

  • Tap on the Windows-key, type cmd and hit enter.
  • Use CD to change the directory to your Chrome profile directory.
  • If you are running Windows XP, it is %USERPROFILE%\Local Settings\Application Data\Google\Chrome\Application
  • If you are running Windows Vista or newer, it is %LOCALAPPDATA%\Google\Chrome\Application
  • Type chrome.exe followed by the space-key, and then the command line switches you want to run. Note that they always begin with two dashes.

This is great for testing purposes, but if you like a certain command and want to run it at all times, you may want to make those changes permanent so that they are automatically used whenever you load Chrome.

If you are starting Google Chrome from a shortcut, placed on the desktop, taskbar or start menu, then you can easily add command line switches to it.  Just right-click the shortcut, locate Google Chrome there, right-click on it and select Properties.

The Shortcut tab should open up automatically. It displays the load path of the browser in the target field. At the end of the field, after the closing ", add a space, and then the command line switches you want to use.

Add another space between each command line switch if you want to use multiple ones.

chrome command line

Useful Chrome command line switches

CommandDescription
--ash-force-desktopForces uses of the desktop version of Chrome
--disable-3d-apisDisables 3D Apis, including WebGL and Pepper 3D
--disable-accelerated-videoDisables GPU accelerated video
--disable-background-modeBackground apps won't continue to run when Chrome exits.
--disable-gpuDisables hardware acceleration using the GPU
--disable-pluginsPrevents all plugins from running
--disable-plugins-discoveryDisables the discovery of missing plugins
--disable-preconnectDisables speculative TCP/IP preconnections
--disable-translateDisables the Google Translate feature
--dns-prefetch-disableDisable DNS prefetching
--enable-kiosk-modeKiosk Mode for Chrome OS
 --incognitoLaunches Chrome directly in Incognito private browsing mode
--media-cache-sizeDisk space used by media cache in bytes
--multi-profilesEnable multiple profiles in Chrome
--new-profile-managementEnable the new profile management in Chrome
--no-experimentsRun Chrome without experiments set in chrome://flags
--no-pingsNo hyperlink auditing pings
--no-referrersUse Chrome without sending referrers
--purge-memory-buttonAdd purge memory button to Chrome
--reset-variation-stateChange the field trials that the browser is currently signed up for
--restore-last-sessionRestore the last session on run
--ssl-version-minSpecify the minimum SSL version accepted
--start-maximizedStarts the Chrome window maximized.
--window-positionSpecify the initial window position using --window-position=x,y
--window-sizeSpecify the initial window size using --window-position=x,y

For a full list of switches, consult this page.

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:

Comments

  1. imu said on October 6, 2013 at 8:08 pm
    Reply

    …and this one is very handy if you want to use Netflix in your browser without being prompt to download Netflix app on Windows 8 :
    –user-agent=”Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20100101 Firefox/21.0″
    this way Netflix thinks you are running Windows 7 and doesn’t force you to get an app to continue.

    Cheers.

    1. Martin Brinkmann said on October 6, 2013 at 10:29 pm
      Reply

      I wish they would finally launch in Germany..

      1. Joel said on October 16, 2013 at 5:26 pm
        Reply

        You’ve got VPN service and fast internet- so why not use it ^^
        Although i do get the point of Not-wanting-to-set-it-permanently that way.. But hey, if your broadband connection allows it- why not =]

  2. kim said on December 4, 2013 at 8:45 pm
    Reply

    Thanks Martin, this was helpful. I’ve been through your instructions, but still not sure if the switch was applied. Is there a way to have Google tell me back what switches are on?

  3. daniel bret said on January 29, 2015 at 1:54 pm
    Reply

    Posting on an old thread here, but.. the problem with command line switches in Chrome (Windows) is once launched with one, no external links will work. In other words, if chrome is running and was launched using an command line argument–clicking, say, an html link in an email does nothing.

    You can of course close the running instance of chrome, then the link will work (but it will launch chrome -without- args).

    Nothing I’ve tried has fixed this, including explicitly setting Chrome as the default browser in Chrome://settings instead of in Windows internet settings. Same. Exact. Behavior.

    Anyone using args with Chrome should be aware of this behavior–losing the ability to click an external link when chrome is active is a show stopper for me.

  4. ssp said on December 5, 2015 at 8:53 am
    Reply

    @Martin – this is really useful , Thank you

  5. Aaron Kelley said on March 30, 2016 at 8:47 pm
    Reply

    –new-window [url]
    Opens a new window with the specified page (if an existing instance of Chrome was already running). You can specify multiple URLs and they will be opened as tabs in the new window.

  6. Ekyl said on August 30, 2016 at 4:48 pm
    Reply

    In my opinion, the most useful: -d
    Opens a new tab with the specified destination, great for opening pages from the command line.

    Example:
    google-chrome -d drive.google.com

  7. Magnus said on August 31, 2016 at 9:50 am
    Reply

    Any way to specify the Chrome window title? I’m opening many different Chrome instances, each one with its own profile, to test a web app, with many accounts. So many Chrome windows make me confused. Window titles would be nice.

  8. Rick said on September 13, 2016 at 2:42 pm
    Reply

    I’m not sure if it was available when this was written, but you can now disable just WebGL using:

    –disable-webgl

  9. Daniel said on July 7, 2017 at 7:24 am
    Reply

    Ekyl, google-chrome does not work… Try using –new-tab to open URL in a new tab rather than a new window.

    Aaron, –new-window will open new windows and not new tabs.

    EXAMPLE: chrome.exe http://www.google.com –new-tab

    1. Victor said on March 21, 2018 at 10:56 pm
      Reply

      Daniel, –new-window will open new window AND new tabs if you specify mutiple address as Aaron mentioned
      EXAMPLE: chrome.exe –new-window http://www.google.com http://www.ghacks.net

  10. Nils Sens said on January 5, 2018 at 2:02 pm
    Reply

    So I’ve got a Chrome window open, and if I run “start chrome.exe -kiosk “http://localhost:3000” it doesn’t open it in Kiosk mode. However, if I run this w/ all Chrome windows closed, it works. This is unfortunate, as I’d love to start my app in fullscreen always, all the time. :/

  11. AutomationMan said on February 16, 2018 at 3:39 am
    Reply

    I had the same problem of Chrome not obeying command switches (–kiosk) at re-load, but if you use task manager and kill of ALL running Chrome processes before attempting a Chrome reload, it will restart in kiosk mode every time :-)
    (Figured this out because it would work if auto-loaded after a reboot)

    The processes remain when Chrome is not exited cleanly i.e.if Alt-F4 is used to exit kiosk mode

    Am working on a simple way to overcome this.

  12. daniel bret said on March 22, 2018 at 12:32 pm
    Reply

    The “not honoring outside links” issue is still there, and it makes this feature of pretty limited usage for Windows users. No command line switch is worth having URL links in emails no longer function when Chrome is already running.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.