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

    <schemaVersion>X0306</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2019-10-11</periodOfReport>

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

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001788938</rptOwnerCik>
            <rptOwnerName>Jones Robertson Clay JR</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>150 ALMADEN BLVD.</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>SAN JOSE</rptOwnerCity>
            <rptOwnerState>CA</rptOwnerState>
            <rptOwnerZipCode>95113</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isOfficer>1</isOfficer>
            <officerTitle>EVP</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock, No Par Value</value>
            </securityTitle>
            <transactionDate>
                <value>2019-10-11</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>30546</value>
                </transactionShares>
                <transactionPricePerShare>
                    <footnoteId id="F1"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>30546</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <derivativeTable>
        <derivativeTransaction>
            <securityTitle>
                <value>Employee Stock Option (right to buy)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>2.57</value>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2019-10-11</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>61750</value>
                </transactionShares>
                <transactionPricePerShare>
                    <footnoteId id="F2"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <value>2019-10-11</value>
            </exerciseDate>
            <expirationDate>
                <value>2021-01-18</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Heritage Commerce Corp - Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>61750</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>61750</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
        <derivativeTransaction>
            <securityTitle>
                <value>Employee Stock Option (right to buy)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>2.79</value>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2019-10-11</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>37050</value>
                </transactionShares>
                <transactionPricePerShare>
                    <footnoteId id="F3"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <value>2019-10-11</value>
            </exerciseDate>
            <expirationDate>
                <value>2022-01-10</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Heritage Commerce Corp - Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>37050</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>37050</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
        <derivativeTransaction>
            <securityTitle>
                <value>Employee Stock Option (right to buy)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>3.98</value>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2019-10-11</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>37050</value>
                </transactionShares>
                <transactionPricePerShare>
                    <footnoteId id="F4"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <value>2019-10-11</value>
            </exerciseDate>
            <expirationDate>
                <value>2024-01-30</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Heritage Commerce Corp - Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>37050</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>37050</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
        <derivativeTransaction>
            <securityTitle>
                <value>Employee Stock Option (right to buy)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>4.92</value>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2019-10-11</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>37050</value>
                </transactionShares>
                <transactionPricePerShare>
                    <footnoteId id="F5"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <value>2019-10-11</value>
            </exerciseDate>
            <expirationDate>
                <value>2025-01-29</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Heritage Commerce Corp - Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>37050</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>37050</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
        <derivativeTransaction>
            <securityTitle>
                <value>Employee Stock Option (right to buy)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>10.74</value>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2019-10-11</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>49399</value>
                </transactionShares>
                <transactionPricePerShare>
                    <footnoteId id="F6"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <value>2019-10-11</value>
            </exerciseDate>
            <expirationDate>
                <value>2028-07-01</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Heritage Commerce Corp - Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>49399</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>49399</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">Received in exchange for 12,367 shares of Presidio Bank common stock in connection with the merger of Presidio Bank with and into Heritage Bank of Commerce, a wholly-owned subsidiary of Heritage Commerce Corp (&quot;HCC&quot;), (the &quot;Merger&quot;) based on the exchange ratio of 2.47 shares of HCC common stock for each share of Presidio Bank common stock. On the effective date of the Merger, the closing price of Presidio Bank common stock was $27.96 per share, and the closing price of HCC common stock was $11.36 per share.</footnote>
        <footnote id="F2">Received in the Merger in exchange for an employee stock option to acquire 25,000 shares of Presidio Bank common stock for $6.34 per share.</footnote>
        <footnote id="F3">Received in the Merger in exchange for an employee stock option to acquire 15,000 shares of Presidio Bank common stock for $6.87 per share.</footnote>
        <footnote id="F4">Received in the Merger in exchange for an employee stock option to acquire 15,000 shares of Presidio Bank common stock for $9.83 per share.</footnote>
        <footnote id="F5">Received in the Merger in exchange for an employee stock option to acquire 15,000 shares of Presidio Bank common stock for $12.14 per share.</footnote>
        <footnote id="F6">Received in the Merger in exchange for an employee stock option to acquire 6,636 shares of Presidio Bank common stock and an employee stock option to acquire 13,364 shares of Presidio Bank common stock, each for $26.52 per share.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>Deborah Reuter as Attorney in fact for Robertson Clay Jones, JR.</signatureName>
        <signatureDate>2019-10-15</signatureDate>
    </ownerSignature>
</ownershipDocument>
