PIN Blocks
PIN block format:
Format 0 (ISO-0)
PAN:
PIN:[0]
Padding character:Single hex digit (0-9, A-F). Default: F
📖 How to Use PIN Block Tool
• Select PIN Block Format: Choose from Format 0 (ISO-0, most common, requires PAN), Format 1 (ISO-1, random padding, no PAN needed), Format 2 (ISO-2, alternative to Format 0), Format 3 (ISO-3, random padding with PAN), or Format 4 (ISO-4, for AES encryption, 32 hex output). Format 0 is standard for ATM/POS transactions, Format 4 is used in modern AES-based systems.
• Choose Operation Mode: Select "Encode" to convert a clear PIN into a PIN block for transmission/storage, or select "Decode" to extract the original PIN from a PIN block. Encoding is used when initializing PINs or preparing for encryption. Decoding is used for PIN verification at acquiring banks or during HSM testing.
• Enter PAN (Primary Account Number): For Formats 0, 2, 3, and 4, enter the full card number (13-19 digits). The tool automatically extracts the rightmost 12 digits excluding the check digit for XOR operations. The PAN must match exactly between encoding and decoding for correct PIN recovery. Format 1 does not require PAN input.
• Enter PIN (Encoding Mode): Input the customer's PIN as 4-12 decimal digits (0-9 only). Common lengths are 4 digits (ATM standard), 6 digits (online banking), or variable length up to 12 digits. The tool validates PIN length and automatically adds the length indicator to the PIN block. Never use sequential (1234) or repeated (1111) PINs in production.
• Enter PIN Block (Decoding Mode): Paste the PIN block in hexadecimal format - 16 hex characters (32 digits) for Formats 0-3, or 32 hex characters (64 digits) for Format 4. The tool parses the format identifier (first character) and length indicator (second character) to extract the PIN. Ensure the PIN block has not been encrypted yet - this tool works with clear PIN blocks only.
• Adjust Padding Character (Optional): For encoding, you can change the padding character from the default "F" to match your system requirements. Some networks use "0" padding or random hex digits. The padding character must be a single hexadecimal digit (0-9, A-F). This setting only affects Formats 0-3; Format 4 uses its own padding scheme.
• Process and Verify Result: Click "Encode" or "Decode" button. For encoding, the result shows the complete PIN block in hexadecimal with format identifier, length indicator, PIN digits, and padding. For decoding, the result displays the extracted PIN and format details. Copy the result using the Copy button. The tool also shows PIN length, block length, and format type for verification. In production, this clear PIN block would then be encrypted with a PIN Encryption Key (PEK) using 3DES or AES before transmission.