<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2019-01-31"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="ufpi-20201105.xsd" xlink:type="simple"/>
    <context id="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000912767</identifier>
        </entity>
        <period>
            <startDate>2020-11-05</startDate>
            <endDate>2020-11-05</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Tc_IpFguI0Eu0WDmyYiw6a77A_2_1">0000912767</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Tc_tm0j4ZW_6E-RE4L9mixWtg_3_1">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Narr_F6VbnMhs1Uy0cgDl6ZQdcA">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Narr_JaHtSV19OkCC43CzdELmCQ">2020-11-05</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Narr_gXRJhMt0_ESaiJhxQlTbHg">UFP INDUSTRIES, INC.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Narr_wA5GIY5pCE2zJfq-zDYmpw">MI</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Narr_eBy6TyUvskyD-DeHBPY5Dg">0-22684</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Narr_a1ZKLjVoikq8xT6frvRRDw">38-1465835</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Narr_MwUiImp3Q0iXShejfwtuiw">2801 East Beltline, NE, Grand Rapids</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Narr_Ivq06PmWX0esTpOKkN8Alw">, </dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Narr_Pq8w1lnXj0Kz9OvJ635Gkg">MI</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Narr_M7n-H7eemEO_h99ouRungA">49525</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Narr_HYKTAmXmg0yML-63Y4o-6g">616</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Narr_wMnfvexMIk2xjmCtHNIUsg">364-6161</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Narr_AxfN8Kwa5U-e54UYwuGO_w">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Narr_liSBWxor2Eeh7oFwlaG29w">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Narr_1SFiHsM7WECZhaNH6CdQCg">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Narr_3FUXY99RqU69Y0-WjNCvzg">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Tc_GspEZM2Bi02WbOX0coKw9A_2_0">Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Tc_U4Pmfl95yUynM23gkYRBdA_2_1">UFPI</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Narr_Q7IZiUGuukqT9_S1wVpJQA">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_11_5_2020_To_11_5_2020_3En19UXF_ECh6LWBx0ZHEQ"
      id="Narr_fg5txV278E6Y_ZN3qWz6Zg">false</dei:EntityEmergingGrowthCompany>
</xbrl>
