Bitcoin Script Opcodes — Complete Reference
Every opcode in the Bitcoin Script language — the stack-based language that defines how bitcoins can be spent — with its hex byte, decimal value, category, status and function.
Quick answer
Bitcoin Script is a small, intentionally non-Turing-complete stack language: a locking script (scriptPubKey) sets spending conditions and an unlocking script (scriptSig / witness) satisfies them. This reference lists all 113 opcodes — word, hex byte, decimal, category, status and function. 15 are disabled (removed in 2010 for safety), several slots are reserved, and the upgradeable no-ops (OP_NOP1–NOP10) are how soft forks like CLTV and CSV added new rules without breaking old nodes.
Most everyday scripts use a handful of opcodes — OP_DUP, OP_HASH160, OP_EQUALVERIFY and OP_CHECKSIG build P2PKH; OP_CHECKMULTISIG, OP_CHECKLOCKTIMEVERIFY and OP_CHECKSEQUENCEVERIFY enable multisig and time-locks; Tapscript adds OP_CHECKSIGADD.
Download CSV Download JSON REST API →
| Word | Hex | Dec | Category | Status | BIP | Function |
|---|---|---|---|---|---|---|
| OP_0 / OP_FALSE | 0x00 | 0 | Constants | Enabled | — | Push an empty byte array (numeric/boolean zero) onto the stack. |
| OP_PUSHBYTES_1–75 | 0x01–0x4b | 1 | Constants | Enabled | — | The next opcode byte (1–75) is the number of subsequent bytes to push as data. |
| OP_PUSHDATA1 | 0x4c | 76 | Constants | Enabled | — | The next 1 byte is the length; push that many following bytes. |
| OP_PUSHDATA2 | 0x4d | 77 | Constants | Enabled | — | The next 2 bytes (LE) are the length; push that many following bytes. |
| OP_PUSHDATA4 | 0x4e | 78 | Constants | Enabled | — | The next 4 bytes (LE) are the length; push that many following bytes. |
| OP_1NEGATE | 0x4f | 79 | Constants | Enabled | — | Push the number -1 onto the stack. |
| OP_RESERVED | 0x50 | 80 | Reserved | Reserved | — | Invalidates the script if executed (does nothing inside an unexecuted branch). |
| OP_1 / OP_TRUE | 0x51 | 81 | Constants | Enabled | — | Push the number 1 onto the stack. |
| OP_2 | 0x52 | 82 | Constants | Enabled | — | Push the number 2 onto the stack. |
| OP_3 | 0x53 | 83 | Constants | Enabled | — | Push the number 3 onto the stack. |
| OP_4 | 0x54 | 84 | Constants | Enabled | — | Push the number 4 onto the stack. |
| OP_5 | 0x55 | 85 | Constants | Enabled | — | Push the number 5 onto the stack. |
| OP_6 | 0x56 | 86 | Constants | Enabled | — | Push the number 6 onto the stack. |
| OP_7 | 0x57 | 87 | Constants | Enabled | — | Push the number 7 onto the stack. |
| OP_8 | 0x58 | 88 | Constants | Enabled | — | Push the number 8 onto the stack. |
| OP_9 | 0x59 | 89 | Constants | Enabled | — | Push the number 9 onto the stack. |
| OP_10 | 0x5a | 90 | Constants | Enabled | — | Push the number 10 onto the stack. |
| OP_11 | 0x5b | 91 | Constants | Enabled | — | Push the number 11 onto the stack. |
| OP_12 | 0x5c | 92 | Constants | Enabled | — | Push the number 12 onto the stack. |
| OP_13 | 0x5d | 93 | Constants | Enabled | — | Push the number 13 onto the stack. |
| OP_14 | 0x5e | 94 | Constants | Enabled | — | Push the number 14 onto the stack. |
| OP_15 | 0x5f | 95 | Constants | Enabled | — | Push the number 15 onto the stack. |
| OP_16 | 0x60 | 96 | Constants | Enabled | — | Push the number 16 onto the stack. |
| OP_NOP | 0x61 | 97 | Flow control | Enabled | — | Does nothing. |
| OP_VER | 0x62 | 98 | Reserved | Reserved | — | Invalidates the script if executed. |
| OP_IF | 0x63 | 99 | Flow control | Enabled | — | Execute the following statements if the top stack value is true. |
| OP_NOTIF | 0x64 | 100 | Flow control | Enabled | — | Execute the following statements if the top stack value is false. |
| OP_VERIF | 0x65 | 101 | Reserved | Reserved | — | Invalidates the script even when inside an unexecuted branch. |
| OP_VERNOTIF | 0x66 | 102 | Reserved | Reserved | — | Invalidates the script even when inside an unexecuted branch. |
| OP_ELSE | 0x67 | 103 | Flow control | Enabled | — | Switch execution within an OP_IF / OP_NOTIF … OP_ENDIF block. |
| OP_ENDIF | 0x68 | 104 | Flow control | Enabled | — | Close an OP_IF / OP_NOTIF / OP_ELSE block. |
| OP_VERIFY | 0x69 | 105 | Flow control | Enabled | — | Mark the script invalid unless the top stack value is true; otherwise pop it. |
| OP_RETURN | 0x6a | 106 | Flow control | Enabled | — | Mark the output provably unspendable; commonly used to embed up to 80 bytes of data. |
| OP_TOALTSTACK | 0x6b | 107 | Stack | Enabled | — | Move the top item to the alt stack. |
| OP_FROMALTSTACK | 0x6c | 108 | Stack | Enabled | — | Move the top alt-stack item back to the main stack. |
| OP_2DROP | 0x6d | 109 | Stack | Enabled | — | Remove the top two stack items. |
| OP_2DUP | 0x6e | 110 | Stack | Enabled | — | Duplicate the top two stack items. |
| OP_3DUP | 0x6f | 111 | Stack | Enabled | — | Duplicate the top three stack items. |
| OP_2OVER | 0x70 | 112 | Stack | Enabled | — | Copy the pair of items two spaces back to the top. |
| OP_2ROT | 0x71 | 113 | Stack | Enabled | — | Move the fifth and sixth items to the top. |
| OP_2SWAP | 0x72 | 114 | Stack | Enabled | — | Swap the top two pairs of items. |
| OP_IFDUP | 0x73 | 115 | Stack | Enabled | — | Duplicate the top item only if it is non-zero. |
| OP_DEPTH | 0x74 | 116 | Stack | Enabled | — | Push the current number of stack items. |
| OP_DROP | 0x75 | 117 | Stack | Enabled | — | Remove the top stack item. |
| OP_DUP | 0x76 | 118 | Stack | Enabled | — | Duplicate the top stack item (core of P2PKH). |
| OP_NIP | 0x77 | 119 | Stack | Enabled | — | Remove the second-from-top item. |
| OP_OVER | 0x78 | 120 | Stack | Enabled | — | Copy the second-from-top item to the top. |
| OP_PICK | 0x79 | 121 | Stack | Enabled | — | Copy the n-th item (n from the top) to the top. |
| OP_ROLL | 0x7a | 122 | Stack | Enabled | — | Move the n-th item (n from the top) to the top. |
| OP_ROT | 0x7b | 123 | Stack | Enabled | — | Rotate the top three items. |
| OP_SWAP | 0x7c | 124 | Stack | Enabled | — | Swap the top two items. |
| OP_TUCK | 0x7d | 125 | Stack | Enabled | — | Copy the top item and insert it below the second item. |
| OP_CAT | 0x7e | 126 | Splice | Disabled | — | Concatenate two byte strings. Disabled for security in 2010. |
| OP_SUBSTR | 0x7f | 127 | Splice | Disabled | — | Return a substring. Disabled. |
| OP_LEFT | 0x80 | 128 | Splice | Disabled | — | Return the left substring. Disabled. |
| OP_RIGHT | 0x81 | 129 | Splice | Disabled | — | Return the right substring. Disabled. |
| OP_SIZE | 0x82 | 130 | Splice | Enabled | — | Push the byte length of the top item (without popping it). |
| OP_INVERT | 0x83 | 131 | Bitwise logic | Disabled | — | Bitwise NOT. Disabled. |
| OP_AND | 0x84 | 132 | Bitwise logic | Disabled | — | Bitwise AND. Disabled. |
| OP_OR | 0x85 | 133 | Bitwise logic | Disabled | — | Bitwise OR. Disabled. |
| OP_XOR | 0x86 | 134 | Bitwise logic | Disabled | — | Bitwise XOR. Disabled. |
| OP_EQUAL | 0x87 | 135 | Bitwise logic | Enabled | — | Push 1 if the top two items are byte-equal, else 0 (core of P2SH). |
| OP_EQUALVERIFY | 0x88 | 136 | Bitwise logic | Enabled | — | OP_EQUAL then OP_VERIFY — fail unless the top two items are equal. |
| OP_RESERVED1 | 0x89 | 137 | Reserved | Reserved | — | Invalidates the script if executed. |
| OP_RESERVED2 | 0x8a | 138 | Reserved | Reserved | — | Invalidates the script if executed. |
| OP_1ADD | 0x8b | 139 | Arithmetic | Enabled | — | Add 1 to the top number. |
| OP_1SUB | 0x8c | 140 | Arithmetic | Enabled | — | Subtract 1 from the top number. |
| OP_2MUL | 0x8d | 141 | Arithmetic | Disabled | — | Multiply the top number by 2. Disabled. |
| OP_2DIV | 0x8e | 142 | Arithmetic | Disabled | — | Divide the top number by 2. Disabled. |
| OP_NEGATE | 0x8f | 143 | Arithmetic | Enabled | — | Flip the sign of the top number. |
| OP_ABS | 0x90 | 144 | Arithmetic | Enabled | — | Absolute value of the top number. |
| OP_NOT | 0x91 | 145 | Arithmetic | Enabled | — | Push 1 if the top number is 0, else 0. |
| OP_0NOTEQUAL | 0x92 | 146 | Arithmetic | Enabled | — | Push 0 if the top number is 0, else 1. |
| OP_ADD | 0x93 | 147 | Arithmetic | Enabled | — | Add the top two numbers. |
| OP_SUB | 0x94 | 148 | Arithmetic | Enabled | — | Subtract the top number from the second. |
| OP_MUL | 0x95 | 149 | Arithmetic | Disabled | — | Multiply the top two numbers. Disabled. |
| OP_DIV | 0x96 | 150 | Arithmetic | Disabled | — | Divide. Disabled. |
| OP_MOD | 0x97 | 151 | Arithmetic | Disabled | — | Modulo. Disabled. |
| OP_LSHIFT | 0x98 | 152 | Arithmetic | Disabled | — | Left bit-shift. Disabled. |
| OP_RSHIFT | 0x99 | 153 | Arithmetic | Disabled | — | Right bit-shift. Disabled. |
| OP_BOOLAND | 0x9a | 154 | Arithmetic | Enabled | — | Push 1 if both numbers are non-zero, else 0. |
| OP_BOOLOR | 0x9b | 155 | Arithmetic | Enabled | — | Push 1 if either number is non-zero, else 0. |
| OP_NUMEQUAL | 0x9c | 156 | Arithmetic | Enabled | — | Push 1 if the two numbers are equal, else 0. |
| OP_NUMEQUALVERIFY | 0x9d | 157 | Arithmetic | Enabled | — | OP_NUMEQUAL then OP_VERIFY. |
| OP_NUMNOTEQUAL | 0x9e | 158 | Arithmetic | Enabled | — | Push 1 if the two numbers are not equal, else 0. |
| OP_LESSTHAN | 0x9f | 159 | Arithmetic | Enabled | — | Push 1 if the second number is less than the top. |
| OP_GREATERTHAN | 0xa0 | 160 | Arithmetic | Enabled | — | Push 1 if the second number is greater than the top. |
| OP_LESSTHANOREQUAL | 0xa1 | 161 | Arithmetic | Enabled | — | Push 1 if the second number is ≤ the top. |
| OP_GREATERTHANOREQUAL | 0xa2 | 162 | Arithmetic | Enabled | — | Push 1 if the second number is ≥ the top. |
| OP_MIN | 0xa3 | 163 | Arithmetic | Enabled | — | Push the smaller of the top two numbers. |
| OP_MAX | 0xa4 | 164 | Arithmetic | Enabled | — | Push the larger of the top two numbers. |
| OP_WITHIN | 0xa5 | 165 | Arithmetic | Enabled | — | Push 1 if x is within [min, max). |
| OP_RIPEMD160 | 0xa6 | 166 | Cryptography | Enabled | — | Hash the top item with RIPEMD-160. |
| OP_SHA1 | 0xa7 | 167 | Cryptography | Enabled | — | Hash the top item with SHA-1. |
| OP_SHA256 | 0xa8 | 168 | Cryptography | Enabled | — | Hash the top item with SHA-256. |
| OP_HASH160 | 0xa9 | 169 | Cryptography | Enabled | — | SHA-256 then RIPEMD-160 (address hashing). |
| OP_HASH256 | 0xaa | 170 | Cryptography | Enabled | — | Double SHA-256 of the top item. |
| OP_CODESEPARATOR | 0xab | 171 | Cryptography | Enabled | — | Mark the point from which signature checks cover the script. |
| OP_CHECKSIG | 0xac | 172 | Cryptography | Enabled | — | Verify a signature against a public key over the transaction. |
| OP_CHECKSIGVERIFY | 0xad | 173 | Cryptography | Enabled | — | OP_CHECKSIG then OP_VERIFY. |
| OP_CHECKMULTISIG | 0xae | 174 | Cryptography | Enabled | — | Verify m-of-n signatures (consumes one extra item — the off-by-one bug). |
| OP_CHECKMULTISIGVERIFY | 0xaf | 175 | Cryptography | Enabled | — | OP_CHECKMULTISIG then OP_VERIFY. |
| OP_NOP1 | 0xb0 | 176 | Reserved (NOP) | Reserved | — | Upgradeable no-op reserved for a future soft fork. |
| OP_CHECKLOCKTIMEVERIFY (OP_NOP2) | 0xb1 | 177 | Locktime | Enabled | BIP65 | Fail unless the output is spent at or after an absolute time/height (CLTV). |
| OP_CHECKSEQUENCEVERIFY (OP_NOP3) | 0xb2 | 178 | Locktime | Enabled | BIP112 | Fail unless a relative lock-time has elapsed (CSV). |
| OP_NOP4 | 0xb3 | 179 | Reserved (NOP) | Reserved | — | Upgradeable no-op reserved for a future soft fork. |
| OP_NOP5 | 0xb4 | 180 | Reserved (NOP) | Reserved | — | Upgradeable no-op reserved for a future soft fork. |
| OP_NOP6 | 0xb5 | 181 | Reserved (NOP) | Reserved | — | Upgradeable no-op reserved for a future soft fork. |
| OP_NOP7 | 0xb6 | 182 | Reserved (NOP) | Reserved | — | Upgradeable no-op reserved for a future soft fork. |
| OP_NOP8 | 0xb7 | 183 | Reserved (NOP) | Reserved | — | Upgradeable no-op reserved for a future soft fork. |
| OP_NOP9 | 0xb8 | 184 | Reserved (NOP) | Reserved | — | Upgradeable no-op reserved for a future soft fork. |
| OP_NOP10 | 0xb9 | 185 | Reserved (NOP) | Reserved | — | Upgradeable no-op reserved for a future soft fork. |
| OP_CHECKSIGADD | 0xba | 186 | Cryptography | Tapscript | BIP342 | Tapscript-only: verify a signature and add 1 to an accumulator (batch multisig). |
Source: Bitcoin Core script/script.h (opcodetype enum) and the Bitcoin Wiki Script reference. Related: soft-fork registry, BIP index, transaction sizes, address types. See the open data hub.
Related products, repair, and setup paths
- how D-Central diagnoses ASIC repairs
- ASIC troubleshooting library
- ASIC manuals and repair guides
- replacement hashboards
- ASIC control boards
- ASIC power supplies
- S19 family replacement hashboard
- C52 replacement control board
- APW12 S19 power supply
- immersion cooling hub
- home immersion cooling guide
- ASIC miners for immersion planning
- ASIC cooling parts
- airflow shroud before immersion
- compare miner specs in the database
- ASIC repair support
Last reviewed June 26, 2026.
