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

    <schemaVersion>X0609</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2026-06-03</periodOfReport>

    <issuer>
        <issuerCik>0001794546</issuerCik>
        <issuerName>CARLSMED, INC.</issuerName>
        <issuerTradingSymbol>CARL</issuerTradingSymbol>
        <issuerForeignTradingSymbol></issuerForeignTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001225480</rptOwnerCik>
            <rptOwnerName>ROOT JONATHAN D</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerNonUSAddressFlag>false</rptOwnerNonUSAddressFlag>
            <rptOwnerStreet1>C/O CARLSMED, INC.</rptOwnerStreet1>
            <rptOwnerStreet2>1800 ASTON AVE., SUITE 100</rptOwnerStreet2>
            <rptOwnerCity>CARLSBAD</rptOwnerCity>
            <rptOwnerState>CA</rptOwnerState>
            <rptOwnerZipCode>92008</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>true</isDirector>
            <isOfficer>false</isOfficer>
            <isTenPercentOwner>false</isTenPercentOwner>
            <isOther>false</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>false</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2026-06-03</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>false</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>13698</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>497697</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>4305806</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>See footnotes</value>
                    <footnoteId id="F2"/>
                    <footnoteId id="F5"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>218524</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>See footnotes</value>
                    <footnoteId id="F3"/>
                    <footnoteId id="F5"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1117743</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>See footnotes</value>
                    <footnoteId id="F4"/>
                    <footnoteId id="F5"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">Constitutes an award of restricted stock units (&quot;RSUs&quot;) for which the Reporting Person is entitled to receive one (1) share of Common Stock for each RSU upon vesting. The RSUs will vest in full on the earlier of (i) the day before the Issuer's 2027 annual meeting of stockholders or (ii) June 3, 2027, subject, in all cases, to the Reporting Person's continued service as a member of the Board of Directors through such vesting date.</footnote>
        <footnote id="F2">Stock held by U.S. Venture Partners XII, L.P. (&quot;USVP XII&quot;).</footnote>
        <footnote id="F3">Stock held by U.S. Venture Partners XII-A, L.P. (&quot;USVP XII-A&quot;).</footnote>
        <footnote id="F4">Stock held by U.S. Venture Partners Select Fund I, L.P., (&quot;USVP SFI&quot;) on its own behalf and as nominee for U.S. Venture Partners Select Fund I-A, L.P. (&quot;USVP SFI-A&quot;).</footnote>
        <footnote id="F5">Presidio Management Group XII, L.L.C (&quot;PMG XII&quot;) is the general partner of USVP XII and USVP XII-A. Presidio Management Group Select Fund I, L.L.C (&quot;PMG SFI,&quot; and, together with USVP XII, USVP XII-A, USVP SFI, USVP SFI-A, and PMG XII, &quot;USVP&quot;) is the general partner of USVP SFI and USVP SFI-A. The Reporting Person is a managing member of PMG XII and PMG SFI and may be deemed to share voting and dispositive power over the stock held by USVP. The Reporting Person disclaims beneficial ownership of such stock, except to the extent of any pecuniary interest therein.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Leonard Greenstein, as attorney-in-fact for Jonathan Root</signatureName>
        <signatureDate>2026-06-22</signatureDate>
    </ownerSignature>
</ownershipDocument>
