List of Google Chrome command line switches

Martin Brinkmann
Oct 6, 2013
Updated • Oct 11, 2021
Google Chrome
|
31

Google Chrome supports hundreds of different command line switches (or flags) 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 Chromium, while others have practical uses that users of the web browser will appreciate as well.

List of Google Chrome Command Line Switches

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

Chromium 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-size=x,y

For a full list of switches, visit this blog post by Peter Beverloo.

ADVERTISEMENT

How to Use a Command Line Switch in Chrome?

For the uninitiated, 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 on Windows.

Chrome command line switches
Adding Google Chrome command line options via cmd

You have two main options to execute command line switches on Chromium. 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 second and the easier way to add a flag to Chrome is the following:

  1. Tap on the Windows-key, type cmd and hit enter.
  2. Use CD to change the directory to your Chrome profile directory.
  3. If you are running Windows XP, it is %USERPROFILE%\Local Settings\Application Data\Google\Chrome\Application
  4. If you are running Windows Vista or newer, it is %LOCALAPPDATA%\Google\Chrome\Application
  5. 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.

Adding Chrome Switches to Desktop Shortcuts/Icons

If you are starting Google Chrome from a shortcut that is 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 switch you want to use. You can add multiple switches, one after the other separated by a single space. For example, this is useful if you want to create a Chrome icon that directly opens the Incognito mode. Just insert the incognito command line flag into the shortcut target and you are done.

Chrome command line
Inserting Chrome command line via shortcut properties
Summary
Article Name
List of Google Chrome Command Line Switches
Description
Chromium command lines (switches, flags) to add, modify features, debug, experiment on Google Chrome. Find how to add them in this guide.
Author
Publisher
Ghacks Tech News
Logo
Advertisement

Previous Post: «
Next Post: «

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. Anonymous said on November 23, 2019 at 4:56 am
        Reply

        Martin… in the command description for –window-size, your example syntax specifies window-position, not window-size …shouldn’t it say:

        Specify the initial window size using –window-size=x,y

      3. Martin Brinkmann said on November 23, 2019 at 6:26 am
        Reply

        Thank you, corrected!.

  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.

  13. Bastian said on March 12, 2019 at 5:24 pm
    Reply

    I am in need to start chrome with a certain width and height. If I use –window-size=800,600 anyway chrome will startup in full screen mode.
    I searched the web and cannot find any handy parameters like in firefox like “-height 800 -width 480”

  14. Dan edens said on May 23, 2019 at 7:47 am
    Reply

    Don’t forget to doskey your chrome taskkill and shortcut all of these. makes the little problems with having to kill manageable^

  15. Karan Jain said on July 3, 2019 at 5:40 am
    Reply

    I am trying to open a webpage in kiosk mode and at the same time, I am loading a virtual keyboard unpacked extension to Chrome. The challenge is that when the webpage opens in kiosk mode, the same time the extension settings page also opens up on top of it. I have also tried closing that extension setting tab using sendkey (Ctrl+4 and Ctrl+W) but it closes the complete chrome instance. Here is the vb script that I am using.

    Set WshShell = WScript.CreateObject(“WScript.Shell”)
    WshShell.run (“chrome.exe –kiosk http://gmail.com –load-extension=C:\LAUNCHER\keyboard”)

    WshShell.AppActivate (“Chrome.exe”)
    WScript.Sleep 3000

    ‘WshShell.sendkeys (“^W”)

    Any help will be appreciated.

    1. a said on August 18, 2020 at 8:19 pm
      Reply

      Ouch… I realize that I’m answering this post a year after it’s posted.
      hmm…

      I just had the same problem. I was opening three tabs and wanted to close the first one. At first I tried using WshShell.Sendkeys (“W”) like you did, but the problem was it closed all three tabs. However, I fixed this by using:
      WScript.Sleep 500
      WshShell.SendKeys “^{F4}”

      In your post, it says that you tried using Control+4, but I’m 99% sure that just takes you to the fourth opened tab if you have one(otherwise it does nothing). Using Control F4, however, is an alternate of using Control W, and it closes a tab. I’m not sure why Control F4 works and Control W doesn’t, but it might have something to do with the sleep statement.

  16. Fazal said on September 24, 2019 at 9:31 pm
    Reply

    Hi,

    Is there a way to open two tabs in the –app mode?

    For example:
    chrome.exe -–new-window –app=google.com app=yahoo.com –new-tab

  17. ver said on June 6, 2020 at 7:54 pm
    Reply

    is there any example i can use if i want to have (chrome.exe -no same adress http://test.com ) the argument is when the http://test.com is open , it will NOT open again in a new tab

  18. a said on August 14, 2020 at 1:04 am
    Reply

    how to open a minimized window?

    1. a said on August 14, 2020 at 6:43 pm
      Reply

      Never mind, I fixed it myself. The reason I needed to open a minimized window using chromium command line switches was so that I could open it up with a batch file. However, I couldn’t find a chromium command line switch that would suit my purpose, so I made a .vbs file that simulated the keystrokes of manually minimizing a page after it’s open(ALT+SPACE+N) using the Wshshell.Sendkeys method and then coded my batch file to open a new window and then run the .vbs file.

  19. Zug said on April 9, 2021 at 11:08 pm
    Reply

    Any way to temporarily change the download folder for the session you’re launching from the command line?

  20. Anonymous said on January 21, 2022 at 10:40 am
    Reply

    Yes

  21. R K said on June 9, 2022 at 5:21 pm
    Reply

    How to change to download folder location for a given session from the command line ?

  22. Anonymous said on June 10, 2022 at 1:32 am
    Reply

    How to use –start-maximized switch on Mac OS? It seems to work only on Windows OS

  23. Richard Dent said on September 1, 2022 at 5:18 pm
    Reply

    This is September and is the first time I’ve used this list. Hoping it’s ok to post 3 months after the last post. Reading the list questions and looking at the command line options, I have clearly not figured everything out.

    I use several profiles in order to separate the tasks and purposes that I implement with Chrome. I have always use the primary Windows storage location and not the users\username location. AND I always configure each case using a shortcut. Here is an example of a Windows 11 command line from one of my shortcuts:

    “C:\Program Files\Google\Chrome\Application\chrome.exe” –user-data-dir=p:\CHRM

    I implement every unique profile using this approach, and it works very well. In this case, p is an encrypted drive. So I mount the drive, and start Chrome using the shortcut, and then unmount the drive when I’m done. I assume that everything I do in a particular session ends up in p, and is protected, essentially not accessible to anyone who might gain access to my computer. There is nothing major that needs to be fixed with this approach, as far as I know.

    There is one (silly?) problem with this that I would really like to fix. With each instance of Chrome using a different profile, Windows usually puts a new icon in the task bar, so I can see every unique profile that I have started. The problem is that Windows or Chrome does not always start a new instance of Chrome using a different icon — i.e. occasionally there is one icon that is managing more than one instance of Chrome. This is IMPORTANT to me since I can have up to 10 or so copies of Chrome running. It is really inconvenient to have to remember where all of them (which are being used for different tasks or projects) are located. If you forget, you have to run your mouse down the taskbar, hover over each icon, to find out which one is managing more than one unique task.

    I have not been able to figure out a setting that FORCES Windows and/or Chrome to create a unique icon for each unique task. Are there any ideas about how to do this, hopefully with the use of another command line switch.

    TIA Richard Dent.

  24. Richard Dent said on September 1, 2022 at 5:38 pm
    Reply

    OH, I thought of a quick follow up comment. I think how the taskbar manages icons is a general problem with Windows 11. Usually Windows does not separate different instances of an app into more than one icon. Example: File Manager. If you start two or more instances of File Manager, they all end up under one icon. You have to hover the mouse over the icon in order to select the instance that you need at a given time. What a pain. It would be very helpful if you could force Windows to separate instances of a given app onto more than one icon. OR just be able to right click one of the taskbar icons and ask Windows to SEPARATE them.

Leave a Reply

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

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.