--- title: Filtering in Chrome DevTools description: Ways to filter requests and messages in Chrome DevTools’ Network and Console tabs. url: https://mattrossman.com/2024/06/28/filtering-in-chrome-devtools/ image: https://mattrossman.com/open-graph/2024/06/28/filtering-in-chrome-devtools.png --- # Filtering in Chrome DevTools Jun 28, 2024 The Console and Network tab of Chrome devtools provides a “filter” input with several accepted methods. [Reference](https://developer.chrome.com/docs/devtools/network/reference#filter) ## Keywords Type space separated keywords to filter by lines that contain those words. Order doesn’t matter. ## Regular expressions You can filter with a regular expression pattern enclosed in slashes (much like the [JavaScript syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions)) For example, to show only `.vrm` and `.glb` files: ``` /(\.vrm)|(\.glb)/ ``` The Network tab even has a handy “Invert” button to exclude matches instead of using it as a search criteria. ## Excluding results Prefix a keyword or regular expression with `-` to invert its effect. To filter by lines that contain “pass” but not “fail”: ``` pass -fail ``` To exclude `.vrm` and `.glb` files: ``` -/(\.vrm)|(\.glb)/ ``` ## Properties In the Network tab, property prefixes such as `domain:` or `status-code:` and their expected values are [documented here](https://developer.chrome.com/docs/devtools/network/reference#filter). To filter by requests from this domain with a 304 (unmodified) status code: ``` domain:mattrossman.com status-code:304 ``` In the Console tab you can use the `url:` prefix to filter logs from a given url. ``` url:https://mattrossman.com ``` This is useful for hiding third party logs. You might also consider filtering by “user messages” from the sidebar. More info on Console filtering is [documented here](https://developer.chrome.com/docs/devtools/console/reference#filter).