<?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-20260529.xsd" xlink:type="simple"/>
    <context id="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000912767</identifier>
        </entity>
        <period>
            <startDate>2026-05-29</startDate>
            <endDate>2026-05-29</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Tc_EBKbgRO6NU-NQL7BV7hF0Q_2_1">0000912767</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Tc_NROCMV5EOEOg-KGPN7OeEw_3_1">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Narr_Mw84ZUfxBkGy6OL0FLebJw">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Narr_9exSbPR01kO5jrWmp9CjDw">2026-05-29</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Narr_oFR1_ZdjQUWua0N4L-3_GA">UFP INDUSTRIES, INC.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Narr_3Fp8EWXRWkO-36hofvseOg">MI</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Narr_46WPlZ_QkESDXQCcwzDHiA">0-22684</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Narr_JdoQiVF7H0Wp_zVil9t56w">38-1465835</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Narr_pq6htN4lR0mflclqq1eV2A">2801 East Beltline, NE </dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Narr_W6-y7hSzJ0qMV1N63r8AQw">Grand Rapids</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Narr_3e91hryavEGoYYp1MdqVdg">MI</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Narr_o-wZRZ7wiUW7wnTsuK3RBA">49525</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Narr_QHlmCP8bIUui7mfYfibT2w">616</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Narr_1yYWs4q5T0WqjR8Z-s9NhQ">364-6161</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Narr_LNfKzMpz2E2Ddr5IR4Owpg">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Narr_gTUd2xCjPEiLOjV1mKqjRQ">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Narr_0Q-0JNrA6EqRZwa6p3Apyg">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Narr_aZt1cs8v_0umuYRyGygc5w">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Tc_j5OfTMFQjUeSPwNpxqPczQ_2_0">Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Tc_MuMcPrB-3EOv3NYwO15AMg_2_1">UFPI</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Narr_-ej5ILqvaUuEL-oQyckwnA">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_5_29_2026_To_5_29_2026_b5COgZ4z30ub8UIAYFvmGQ"
      id="Narr_46NEE2-9fU2gmpRyezN9Dg">false</dei:EntityEmergingGrowthCompany>
</xbrl>
