<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="ufpi-20260430.xsd" xlink:type="simple"/>
    <context id="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000912767</identifier>
        </entity>
        <period>
            <startDate>2026-04-30</startDate>
            <endDate>2026-04-30</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Tc_X0E0g-i_B0CRH1cwMoazfw_2_1">0000912767</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Tc_msvgVFUPKE2piVF4rwnQUQ_3_1">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Narr_-q63ZxTYe0yKceG45fXNbw">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Narr_WpXx0NHdBkCiWdtAoNVbow">2026-04-30</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Narr_SuG59zqQX0O_9oOJ8cxj2Q">UFP INDUSTRIES, INC.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Narr_ADUs3jaOlkCM16iDE1IWig">MI</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Narr_9KMYP7ufWU2WVgZo5ELBZg">0-22684</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Narr_HJaSOhgcxEWRa8bbhu5LJQ">38-1465835</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Narr_-SSo-y1Y4E2ACOjQgy04qg">2801 East Beltline, NE</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Narr_PmfSqn1DkkKtnTAPm60cPg">Grand Rapids</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Narr_qpWR1_2iiU6ToMl6mAHQQg">MI</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Narr_o469TI-CU0GkRci4Huwtrw">49525</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Narr_sgOQsUSD0EOWxXuyEyQrIA">616</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Narr_34kP213TdkWOcYXSdiNb8g">364-6161</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Narr_2BU5hQtiN0O4S-M823ttgQ">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Narr_nRwnyIocuUSMiq-RpXfVLA">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Narr_mb1exqOSH0Wp7bU0QSISyw">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Narr_UBHJaW4vdkmzW99KqmTsgg">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Tc_Ukcg2h2E3EavleKu4UOBuA_2_0">Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Tc_2f-DepNlB0yYoRdOuwE5oA_2_1">UFPI</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Narr_1Yi8x0apW0acA7gq3L8RMg">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_4_30_2026_To_4_30_2026_406Ul2wPMUClhJ19sHejPA"
      id="Narr_eEuT5qZsnke5fFkZDrxAkA">false</dei:EntityEmergingGrowthCompany>
</xbrl>
