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

    <schemaVersion>X0609</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2026-08-07</periodOfReport>

    <issuer>
        <issuerCik>0001394056</issuerCik>
        <issuerName>ONE STOP SYSTEMS, INC.</issuerName>
        <issuerTradingSymbol>OSS</issuerTradingSymbol>
        <issuerForeignTradingSymbol></issuerForeignTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001755059</rptOwnerCik>
            <rptOwnerName>KNOWLES MICHAEL</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerNonUSAddressFlag>false</rptOwnerNonUSAddressFlag>
            <rptOwnerStreet1>2235 ENTERPRISE STREET, SUITE 110</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>ESCONDIDO</rptOwnerCity>
            <rptOwnerState>CA</rptOwnerState>
            <rptOwnerZipCode>92029</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>true</isDirector>
            <isOfficer>true</isOfficer>
            <isTenPercentOwner>false</isTenPercentOwner>
            <isOther>false</isOther>
            <officerTitle>Chief Executive Officer</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>false</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2026-08-07</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>F</transactionCode>
                <equitySwapInvolved>false</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>8621</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>13.32</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>598762</value>
                    <footnoteId id="F2"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2026-08-15</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>F</transactionCode>
                <equitySwapInvolved>false</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>8621</value>
                    <footnoteId id="F3"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>13.61</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>590141</value>
                    <footnoteId id="F4"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">The Reporting Person forfeited 8,621 shares of common stock upon conversion of an aggregate 21,908 vested and outstanding restricted stock units into shares of common stock to cover tax withholdings, using the market price of the issuer's common stock at the time of forfeiture. These restricted stock units were part of the grant reported in Table I of the Form 4 filed by the Reporting Person with the Securities and Exchange Commission on February 7, 2025.</footnote>
        <footnote id="F2">Includes 311,403 unvested restricted stock units held by the Reporting Person, all of which remain subject to certain vesting conditions.</footnote>
        <footnote id="F3">The Reporting Person forfeited 8,621 shares of common stock upon conversion of an aggregate 21,908 vested and outstanding restricted stock units into shares of common stock to cover tax withholdings, using the market price of the issuer's common stock at the time of forfeiture. These restricted stock units were part of the grant reported in Table I of the Form 4 filed by the Reporting Person with the Securities and Exchange Commission on July 1, 2024.</footnote>
        <footnote id="F4">Includes 289,495 unvested restricted stock units held by the Reporting Person, all of which remain subject to certain vesting conditions.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Michael Knowles</signatureName>
        <signatureDate>2026-09-04</signatureDate>
    </ownerSignature>
</ownershipDocument>
