How to show all products on category pages in Magento 2

Use the below code in catalog_category_view.xml

<action method="setDefaultGridPerPage">
    <argument name="limit" xsi:type="string">all</argument>
</action>

This will show all products on category pages by default.


it should display by default. Check if you have products and the catalog settings to display if it is set to 5 products change to a number which will display all your products. Also check how many products to be displayed per page and whether navigation controller is on ie. Next page menu.

On main page you can add a widget and set it to display all products


Dimple Patel's answer is right, but to be more specific, if you need to show all products in all categories and want to do it trough xml you should reference the block product_list_toolbar in the catalog_category_view.xml like this:

<referenceBlock name="product_list_toolbar">
    <action method="setDefaultGridPerPage">
        <argument name="limit" xsi:type="string">all</argument>
    </action>
</referenceBlock>