<?xml version="1.0"?>
<ownershipDocument>
    <schemaVersion>X0201</schemaVersion>

    <documentType>4</documentType><periodOfReport>2004-01-09</periodOfReport>
    <issuer>
        <issuerCik>0001008554</issuerCik>
        <issuerName>HUMBOLDT BANCORP</issuerName>
        <issuerTradingSymbol>HBEK</issuerTradingSymbol></issuer><reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001008445</rptOwnerCik>
            <rptOwnerName>EASTRIDGE HAROLD M</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O HUMBOLDT BANCORP</rptOwnerStreet1>
            <rptOwnerStreet2>2998 DOUGLAS BLVD., STE 330</rptOwnerStreet2>
            <rptOwnerCity>ROSEVILLE</rptOwnerCity>
            <rptOwnerState>CA</rptOwnerState>
            <rptOwnerZipCode>95661</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
            <reportingOwnerRelationship>
<isDirector>1</isDirector><isOfficer>0</isOfficer><isTenPercentOwner>0</isTenPercentOwner><isOther>0</isOther></reportingOwnerRelationship></reportingOwner><nonDerivativeTable><nonDerivativeTransaction><securityTitle><value>Common Stock </value></securityTitle><transactionDate><value>2004-01-09</value></transactionDate><transactionCoding><transactionFormType>4</transactionFormType><transactionCode>X</transactionCode><equitySwapInvolved>0</equitySwapInvolved></transactionCoding><transactionAmounts><transactionShares><value>3846</value></transactionShares><transactionPricePerShare><value>4.68</value></transactionPricePerShare><transactionAcquiredDisposedCode><value>A</value></transactionAcquiredDisposedCode></transactionAmounts><postTransactionAmounts><sharesOwnedFollowingTransaction><value>109750</value><footnoteId id="F1"/></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>D</value></directOrIndirectOwnership><natureOfOwnership><value/></natureOfOwnership></ownershipNature></nonDerivativeTransaction></nonDerivativeTable><derivativeTable><derivativeTransaction><securityTitle><value>Stock Option Right to Buy</value></securityTitle><conversionOrExercisePrice><value>4.68</value></conversionOrExercisePrice><transactionDate><value>2004-01-09</value></transactionDate><transactionCoding><transactionFormType>4</transactionFormType><transactionCode>X</transactionCode><equitySwapInvolved>0</equitySwapInvolved></transactionCoding><transactionAmounts><transactionShares><value>3846</value></transactionShares><transactionPricePerShare><value>4.68</value></transactionPricePerShare><transactionAcquiredDisposedCode><value>D</value></transactionAcquiredDisposedCode></transactionAmounts><exerciseDate><value>1994-01-12</value></exerciseDate><expirationDate><value>2004-01-12</value></expirationDate><underlyingSecurity><underlyingSecurityTitle><value>Common Stock </value></underlyingSecurityTitle><underlyingSecurityShares><value>3846</value></underlyingSecurityShares></underlyingSecurity><postTransactionAmounts><sharesOwnedFollowingTransaction><value>55224</value></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>D</value></directOrIndirectOwnership><natureOfOwnership><value/></natureOfOwnership></ownershipNature></derivativeTransaction></derivativeTable><footnotes><footnote id="F1">Ownership of common stock as follows: 3,846 held Direct from Stock Option Exercise 1-9-2004. (*1,519) held Indirect by Immediate Family Member, (*104,385) held Direct. The two amounts with asterisks are subject to the additional footnote.  Represents the number of shares of California Independent Bancorp prior
to the merger between Humboldt Bancorp and California Independent Bancorp. Under the terms of the merger agreement, each share of California Independent Bancorp common stock shall be converted into the right to receive, at the election of each shareholder of California Independent Bancorp, and subject to proration, either (i)2.1965 shares of Humboldt Bancorp common stock or (ii) $38.79 in cash.  Upon the completion of the allocation procedure and final results by Illinois Stock transfer, the Exchange Agent, this Form will be amended to reflect the final amounts.</footnote></footnotes><remarks/><ownerSignature><signatureName>Harold M. Eastridge</signatureName><signatureDate>2004-01-13</signatureDate></ownerSignature><ownerSignature><signatureName>Signed by Patrick J. Rusnak, Power of Attorney on File</signatureName><signatureDate>2004-01-13</signatureDate></ownerSignature></ownershipDocument>

