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

    <schemaVersion>X0306</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2022-09-30</periodOfReport>

    <issuer>
        <issuerCik>0000357173</issuerCik>
        <issuerName>OLD SECOND BANCORP INC</issuerName>
        <issuerTradingSymbol>OSBC</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001673321</rptOwnerCik>
            <rptOwnerName>Pilmer Donald</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>37 S. RIVER ST.</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>AURORA</rptOwnerCity>
            <rptOwnerState>IL</rptOwnerState>
            <rptOwnerZipCode>60506</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>false</isDirector>
            <isOfficer>true</isOfficer>
            <isTenPercentOwner>false</isTenPercentOwner>
            <isOther>false</isOther>
            <officerTitle>EVP</officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Old Second Bancorp, Inc. Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2022-09-30</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>5</transactionFormType>
                <transactionCode>J</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>13</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>3834</value>
                    <footnoteId id="F1"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>By 401-K Plan</value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Old Second Bancorp, Inc. Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2022-09-30</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>5</transactionFormType>
                <transactionCode>J</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>1</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>174</value>
                    <footnoteId id="F2"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>By Profit Sharing Plan</value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Old Second Bancorp, Inc. Common Stock</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1450</value>
                    <footnoteId id="F3"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>Spouse's IRA</value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Old Second Bancorp, Inc. Common Stock</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>72326</value>
                    <footnoteId id="F4"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <derivativeTable></derivativeTable>

    <footnotes>
        <footnote id="F1">Of this total, 13 shares were allocated during the third quarter pursuant to the Old Second Bancorp Inc Employee Savings Plan and Trust. Information herein was provided by the Plan Trustee as of 9-30-22.</footnote>
        <footnote id="F2">Of this total, 1 share was allocated during the third quarter pursuant to the Old Second Bancorp Inc Salary Savings Plan and Trust. Information herein was provided by the Plan Trustee as of 9-30-22.</footnote>
        <footnote id="F3">These shares are held in spouse's IRA for which Mr. Pilmer is listed as a beneficiary.</footnote>
        <footnote id="F4">Included in this total are 44,933 shares held in a brokerage account and 27,393 shares of Restricted Stock Units.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Shirley Cantrell, Attorney-in-Fact</signatureName>
        <signatureDate>2022-09-30</signatureDate>
    </ownerSignature>
</ownershipDocument>
