Skip to Content
🚧 The WebNN documentation is work-in-progress. Share feedback →

WebNN Flags in Chromium based Browsers

Flags

Visit via about://flags/

#web-machine-learning-neural-network

NameEnables WebNN API
DescriptionEnables the Web Machine Learning Neural Network (WebNN) API. Spec at https://www.w3.org/TR/webnn/ – Mac, Windows, Linux, ChromeOS, Android.
Expiry Milestone150
Command Line Usage"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --enable-features=WebMachineLearningNeuralNetwork
  • %LOCALAPPDATA% means C:\Users\<username>\AppData\Local\

#webnn-onnxruntime

NameWindows ML / ONNX Runtime backend for WebNN
DescriptionEnables using ONNX Runtime for CPU, GPU and NPU inference with the WebNN API. Disabling this flag enables a fallback to DirectML or TFLite. – Windows
Expiry Milestone146
Command Line Usage"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --enable-features=WebMachineLearningNeuralNetwork,WebNNOnnxRuntime

#experimental-web-machine-learning-neural-network

NameEnables experimental WebNN API features
DescriptionEnables additional, experimental features in Web Machine Learning Neural Network (WebNN) API. Requires the “WebNN API” flag to be enabled. – Mac, Windows, Linux, ChromeOS, Android.
Expiry Milestone150
Command Line Usage"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --enable-features=EnablesExperimentalWebNNAPIFeatures

#webnn-coreml

NameCore ML backend for WebNN
DescriptionEnables using Core ML for GPU and NPU inference with the WebNN API
Expiry Milestone146

#webnn-coreml-explicit-gpu-or-npu

NameCore ML backend (explicit GPU or NPU) for WebNN
DescriptionEnables using Core ML for explicit GPU and NPU inference with the WebNN API
Expiry Milestone146

#webnn-directml

NameDirectML backend for WebNN
DescriptionEnables using DirectML for GPU and NPU inference with the WebNN API. Disabling this flag enables a fallback to TFLite. – Windows.
Expiry Milestone146

Switches (Command Line Flags)

--use-redist-dml

NameUse redistributable DirectML
DescriptionTry to use a redistributable DirectML.dll. Used for testing WebNN against newer DirectML release before it is integrated into Windows OS. Please see more info about DirectML releases.
NoteDirectML was officially deprecated during Microsoft Build 2025. WebNN will leverage Windows ML to access OpenVINO and other EPs to get hardware acceleration.
Usage"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --use-redist-dml

--disable_dml_meta_commands_for_gpu

NameDisable DirectML Metacommands for GPU
DescriptionRun with DirectML fallback shaders if disabling Metacommands
NoteDirectML was officially deprecated during Microsoft Build 2025. WebNN will leverage Windows ML to access OpenVINO and other EPs to get hardware acceleration.
Usage (true)"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --disable_dml_meta_commands_for_gpu=1
Usage (false)"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --disable_dml_meta_commands_for_gpu=0

--disable_webnn_for_gpu

NameDisable WebNN for GPU
DescriptionIf --disable_webnn_for_gpu workaround is enabled for the GPU device, we need to check to see if there is a NPU device available before setting the WebNN gpu feature status.
Usage (true)"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --disable_webnn_for_gpu=1

--disable_webnn_for_npu

NameDisable WebNN for NPU
DescriptionIf there is a NPU device, check the --disable_webnn_for_npu workaround
Usage (true)"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --disable_webnn_for_npu=1
Usage (false)"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --disable_webnn_for_npu=0

--webnn-coreml-dump-model

NameWebNN Core ML Dump Model
DescriptionCopy the generated Core ML model
NoteThe folder needs to be accessible from the GPU sandbox or use --no-sandbox
Usage"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --no-sandbox --webnn-coreml-dump-model=/tmp/CoreMLModels

--webnn-tflite-dump-model

NameWebNN TFLite Dump Model
DescriptionSave the generated TFLite model file
NoteThe folder needs to be accessible from the GPU process sandbox or --no-sandbox must be used
Usage"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --no-sandbox --webnn-tflite-dump-model=/tmp/tflite_models

--webnn-ort-logging-level

NameWebNN ONNX Runtime Logging Level
DescriptionConfigure the logging severity level of ONNX Runtime
Note”VERBOSE”, other severity levels could be “INFO”, “WARNING”, “ERROR” (default), and “FATAL”
Usage"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --webnn-ort-logging-level=VERBOSE

--webnn-ort-dump-model

NameWebNN Windows ML Dump Model
DescriptionTo save optimized ONNX model after graph level transformations
Usage"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --no-sandbox --webnn-ort-dump-model=/tmp/ort_models

--webnn-ort-library-path-for-testing

NameWebNN ONNX Runtime Library Path For Testing
DescriptionForce onnxruntime.dll to be loaded from a location specified by the switch for testing development ORT build.
NoteThis switch is not to be used in shipping scenarios and is ignored by default
Usage"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --webnn-ort-library-path-for-testing="C:\Program Files\ONNXRuntime" --allow-third-party-modules

--webnn-ort-ep-library-path-for-testing

NameWebNN ONNX Runtime Execution Provider Library Path For Testing
DescriptionSpecify the ORT EP name and library path pair via this switch for testing development EP builds. Libraries of the ORT EP specified by the EP name are forced to be loaded from the specified path. The value should be in the format <ep_name>?<ep_library_path>.
NoteThis switch is not to be used in shipping scenarios and is ignored by default
Usage"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --webnn-ort-ep-library-path-for-testing=OpenVINOExecutionProvider?"C:\Program Files\ONNXRuntime-EP\onnxruntime_providers_openvino_plugin.dll" --allow-third-party-modules

--webnn-ort-graph-optimization-level

NameWebNN ONNX Runtime Graph Optimization Level
DescriptionConfigure the graph optimization level of ONNX Runtime
NoteLevels could be “DISABLE_ALL”, “BASIC”, “EXTENDED” and “ALL”
Usage"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --webnn-ort-graph-optimization-level=DISABLE_ALL

--webnn-ort-enable-profiling

NameWebNN ONNX Runtime Enable Profiling
DescriptionCollect ORT profile data for performance analysis. The profile data file is generated in Chrome’s folder with a fixed naming format prefix_date_time.json.
NoteThe prefix can be provided by user or use WebNNOrtProfile as default
Usage"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --no-sandbox --webnn-ort-enable-profiling="WebNNOrtOvCpuProfile"

Other Switches

--disable-gpu-sandbox

NameDisable GPU Sandbox
DescriptionOften used to fix crashes related to the GPU process. Should only be used when necessary for development or troubleshooting, as it makes the application vulnerable to exploits.
NoteThis is an insecure configuration. After performing the test, you should quit Chrome and re-launch normally.
Usage"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --disable-gpu-sandbox

--no-sandbox

NameNo Sandbox
DescriptionDisables Chromium’s security sandbox, which isolates browser processes to prevent malicious code execution. While sometimes used in development/testing environments, using this flag in regular browsing is dangerous as it removes essential security protections.
NoteThis is an insecure configuration. After performing the test, you should quit Chrome and re-launch normally.
Usage"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --no-sandbox

--allow-third-party-modules

NameAllow Third-party Modules
DescriptionPermits third-party software to inject DLLs or modules into Chrome’s processes
NoteWhile useful for legitimate software like antivirus or accessibility tools, it can pose security risks by allowing potentially malicious code injection.
Usage"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --allow-third-party-modules

Additional Resources

Last updated on