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

    <documentType>3</documentType><periodOfReport>2003-10-28</periodOfReport>
    <noSecuritiesOwned>0</noSecuritiesOwned>

    <issuer>
        <issuerCik>0000027996</issuerCik>
        <issuerName>DELUXE CORP</issuerName>
        <issuerTradingSymbol>DLX</issuerTradingSymbol></issuer><reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001268521</rptOwnerCik>
            <rptOwnerName>ODWYER MARY ANN</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>666 GARLAND PLACE</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>DES PLAINES</rptOwnerCity>
            <rptOwnerState>IL</rptOwnerState>
            <rptOwnerZipCode>60016</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
            <reportingOwnerRelationship>
<isDirector>1</isDirector><isOfficer>0</isOfficer><isTenPercentOwner>0</isTenPercentOwner><isOther>0</isOther></reportingOwnerRelationship></reportingOwner><nonDerivativeTable><nonDerivativeHolding><securityTitle><value>Restricted Shares</value></securityTitle><postTransactionAmounts><sharesOwnedFollowingTransaction><value>1000</value><footnoteId id="F1"/></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>D</value></directOrIndirectOwnership><natureOfOwnership><value/></natureOfOwnership></ownershipNature></nonDerivativeHolding></nonDerivativeTable><footnotes><footnote id="F1">Represents restricted shares of the Company's common stock issued pursuant to the Company's Stock Incentive Plan on October 28, 2003.  The shares vest in three equal installments on the dates of the three succeeding annual shareholders' meetings of the Company held following the date of grant, provided that the holder remains a director of the Company after the meeting.</footnote></footnotes><remarks/><ownerSignature><signatureName>Anthony C. Scarfone as Power of Attorney for Mary Ann O'Dwyer</signatureName><signatureDate>2003-11-04</signatureDate></ownerSignature></ownershipDocument>

