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

    <schemaVersion>X0306</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2021-08-12</periodOfReport>

    <issuer>
        <issuerCik>0001053352</issuerCik>
        <issuerName>HERITAGE COMMERCE CORP</issuerName>
        <issuerTradingSymbol>HTBK</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001305222</rptOwnerCik>
            <rptOwnerName>Moles Robert</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>HERITAGE COMMERCE CORP</rptOwnerStreet1>
            <rptOwnerStreet2>224 AIRPORT PARKWAY</rptOwnerStreet2>
            <rptOwnerCity>SAN JOSE</rptOwnerCity>
            <rptOwnerState>CA</rptOwnerState>
            <rptOwnerZipCode>95110</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock, No Par Value</value>
            </securityTitle>
            <transactionDate>
                <value>2021-08-12</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>J</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>10360</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>34624</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <derivativeTable>
        <derivativeHolding>
            <securityTitle>
                <value>Standard Employee Option - NSO</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>6.39</value>
            </conversionOrExercisePrice>
            <exerciseDate>
                <value>2012-05-01</value>
            </exerciseDate>
            <expirationDate>
                <value>2022-05-01</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock, No Par Value</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>4500</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>4500</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeHolding>
        <derivativeHolding>
            <securityTitle>
                <value>Standard Employee Option - NSO</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>6.57</value>
            </conversionOrExercisePrice>
            <exerciseDate>
                <value>2013-04-30</value>
            </exerciseDate>
            <expirationDate>
                <value>2023-04-30</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock, No Par Value</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>4500</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>4500</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeHolding>
        <derivativeHolding>
            <securityTitle>
                <value>Standard Employee Option - NSO</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>8.07</value>
            </conversionOrExercisePrice>
            <exerciseDate>
                <value>2014-02-27</value>
            </exerciseDate>
            <expirationDate>
                <value>2024-02-27</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock, No Par Value</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>4500</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>4500</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeHolding>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">Shares transferred to former spouse in anticipation of a divorce settlement agreement involving the division of assets. Reporting person is no longer reporting indirect ownership shares held by former spouse who no longer shares same household.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Debbie Reuter as Attorney in fact for Robert Moles</signatureName>
        <signatureDate>2021-08-12</signatureDate>
    </ownerSignature>
</ownershipDocument>
