<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2026"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="ufpi-20261104.xsd" xlink:type="simple"/>
    <context id="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000912767</identifier>
        </entity>
        <period>
            <startDate>2026-11-04</startDate>
            <endDate>2026-11-04</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Tc_vBOEb4RJqkKBN4H9QkUOHQ_2_1">0000912767</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Tc_ESX94wf9pESniYHeMmRwlg_3_1">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Narr_eqNGKOx770i9farBDCFYmA">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Narr_Yc3OZhcTKEC0SUicPwKbiQ">2026-11-04</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Narr_ZW1tKumqvky4Ulk-ZSqhWw">UFP INDUSTRIES, INC.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Narr__FtTyqZKCk298QByUougzA">MI</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Narr_U3fXBko56EKo6KTYxTPaSg">0-22684</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Narr_YwpAxMi8bk6Ry1x3wKvQ9Q">38-1465835</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Narr_wehZ6cOkekSmTWiBUiCxSg">2801 East Beltline, NE </dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Narr_RYkQ6rcU6kSCRw6ysz-9jw">Grand Rapids</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Narr_I0R2r4JQtkmgsviGluQUwQ">MI</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Narr_9Yf7W65Sj0CiYBRxgtv5Ow">49525</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Narr_89TndX66rEqcZKQlkS8gRQ">616</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Narr_bx1KVG-amEqjMlnhZ5I_cQ">364-6161</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Narr_GAofo42o3EOUhLxMKo5Byg">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Narr_0YswH4hO0kmkV_RejBrHzQ">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Narr_czvz_LQ4vkS2Ub3zfAtv1g">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Narr_P4BZBsbnp0-ehdLU1lBqvg">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Tc_NdgWYZPi0keCHeKeFuOZsg_2_0">Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Tc_DdsXXsYYcEiIwaQrQFTy-A_2_1">UFPI</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Narr_UTU9YFy9ykKSaOB4LCgKRQ">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_11_4_2026_To_11_4_2026_b_f0_ClGjkm3lYMfq9pLjA"
      id="Narr_pAckVvRgRkaMHUwVsR6tyQ">false</dei:EntityEmergingGrowthCompany>
</xbrl>
