<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0206</schemaVersion>

    <documentType>3</documentType>

    <periodOfReport>2024-12-02</periodOfReport>

    <noSecuritiesOwned>0</noSecuritiesOwned>

    <issuer>
        <issuerCik>0000785956</issuerCik>
        <issuerName>J&amp;J SNACK FOODS CORP</issuerName>
        <issuerTradingSymbol>JJSF</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001934178</rptOwnerCik>
            <rptOwnerName>Munsell Shawn</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O J&amp;J SNACK FOODS CORP.</rptOwnerStreet1>
            <rptOwnerStreet2>350 FELLOWSHIP ROAD</rptOwnerStreet2>
            <rptOwnerCity>MOUNT LAUREL</rptOwnerCity>
            <rptOwnerState>NJ</rptOwnerState>
            <rptOwnerZipCode>08054</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isOfficer>1</isOfficer>
            <officerTitle>Chief Financial Officer</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common stock, no par value</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1151</value>
                    <footnoteId id="F1"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">On December 2, 2024, 1,151 restricted stock units were issued to the Reporting Person pursuant to a Restricted Stock Unit Award Agreement, with such shares vesting equally on the first, second and third anniversaries of the grant date.</footnote>
    </footnotes>

    <remarks>Exhibit 24 &amp;#8211; Power of Attorney</remarks>

    <ownerSignature>
        <signatureName>/s/ Michael A. Pollner, Attorney in Fact</signatureName>
        <signatureDate>2024-12-03</signatureDate>
    </ownerSignature>
</ownershipDocument>
