OP_CAT

Definition: OP_CAT is a Bitcoin Script opcode that joins the two top values on a script stack into one value, preserving their order. Bitcoin included OP_CAT in early versions, but it was disabled in 2010. BIP 347 proposes redefining OP_SUCCESS126 to enable OP_CAT in Tapscript through a consensus soft fork. The proposal’s “Complete” status describes its specification; it does not mean the change has activated on Bitcoin. 12

OpcodeOP_CAT (“concatenate”)
ProposalBIP 347: OP_CAT in Tapscript1
Proposed behaviorRemove two stack values, concatenate them in order, and push the result back onto the stack1
ScopeTapscript only, by redefining OP_SUCCESS126 in a proposed soft fork1
Maximum result size520 bytes under the BIP 347 specification1
Current statusSpecification marked Complete; this status alone does not activate the proposal as Bitcoin consensus rules1
DirectoryBitcoin Directory

How OP_CAT works

Bitcoin Script evaluates instructions using a stack of values. Under BIP 347, OP_CAT would take the two values at the top of that stack and combine their bytes. If the stack contains x1 below x2, with x2 on top, the result is x1 followed by x2. The opcode fails if the stack has fewer than two values or if the combined value is larger than the 520-byte script-element limit. 1

This is a small operation with no direct knowledge of transactions, addresses, or balances. It does not read arbitrary blockchain data or create a new transaction. Instead, it gives a script a way to assemble a value from pieces already available to that script. Other instructions can then hash, compare, or check signatures against the assembled value. 2

Why developers discuss it

OP_CAT can make some data structures easier to express in Tapscript. For example, a script may need to join a public value supplied by its creator with another value supplied by the person spending an output, then verify a hash or signature involving the combined data. Bitcoin Optech describes applications involving Merkle-style commitments, tree signatures, and covenant-like spending conditions. These are constructions developers could build if the required consensus rules were adopted; OP_CAT itself is not a finished wallet feature or contract service. 2

A covenant is a spending condition that restricts how an output may be spent in the future. OP_CAT can contribute to certain covenant designs by helping a script assemble data about a proposed transaction for a signature or hash check. The exact restrictions depend on the complete script construction and the other opcodes it uses. Some proposed applications need additional changes or assumptions, so it is inaccurate to describe OP_CAT alone as enabling every kind of covenant or general-purpose smart contract. 2

Other research explores cryptographic constructions such as tree signatures, hash-based signatures, and dispute mechanisms for off-chain computation. The BIP specifies the opcode’s behavior; it does not endorse every proposed use or guarantee that a particular design is secure, practical, or adopted. Developers must analyze the specific script, its spending paths, fees, and recovery assumptions. 12

BIP 347 and Tapscript

BIP 347 proposes enabling OP_CAT only in Tapscript, the script language used by Taproot script-path spends. It would give the existing OP_SUCCESS126 opcode a stricter meaning: instead of immediately satisfying script validation under the current upgrade mechanism, it would concatenate two stack elements under the new rules. This design uses the soft-fork upgrade path defined for Tapscript. The proposal does not re-enable OP_CAT in older Bitcoin Script versions. 13

The BIP retains the 520-byte maximum for each resulting stack element. It deliberately treats the decision to re-enable the opcode separately from any proposal to change that size limit. A bounded operation can still add new expressive power to scripts, and any consensus change would require broad review, implementation, and network activation before users could rely on it. 1

Status and limitations

The Bitcoin BIPs repository marks BIP 347’s specification Complete. In BIP terminology, that records the state of the proposal document; it is not evidence that Bitcoin miners or node operators activated the soft fork. Until compatible consensus rules are activated, ordinary Bitcoin nodes do not enforce BIP 347’s proposed OP_CAT behavior. A wallet or application that describes a design as “OP_CAT-enabled” should therefore identify the network and rules it actually uses, such as a test environment or a separate signet deployment. 14

The proposal is part of an ongoing debate about how much scripting functionality Bitcoin should add and how best to review possible uses and risks. Supporters point to compact primitives that may support more flexible transaction policies. Critics may question whether the applications justify the added protocol complexity or prefer narrower alternatives. The technical BIP alone does not settle that policy discussion or provide a deployment timetable. 12

History

  • 2010: OP_CAT was disabled in Bitcoin’s script system. 1
  • October 2023: Developers discussed a proposal to re-enable OP_CAT in Tapscript. 1
  • December 11, 2023: The proposal received BIP number 347. 1
  • May 6, 2024: BIP 347 was merged into the Bitcoin BIPs repository. 1
  • March 1, 2026: The BIP changelog recorded version 1.0.0 as Complete. This completed the specification milestone, not network activation. 1

Page updated: November 10, 2026.

Related Terms

Related Articles

See Also

Sources

  1. Heilman, Ethan, and Armin Sabouri. “BIP 347: OP_CAT in Tapscript.” Bitcoin Improvement Proposals. Assigned December 11, 2023; version 1.0.0 marked Complete March 1, 2026. Accessed November 10, 2026. BIP 347.
  2. Bitcoin Optech. “OP_CAT.” Accessed November 10, 2026. Topic guide.
  3. Heilman, Ethan, and Armin Sabouri. “BIP 347: OP_CAT in Tapscript.” “Abstract” and “Specification.” Bitcoin Improvement Proposals. Accessed November 10, 2026. BIP 347 specification.
  4. Bitcoin Core Developers. “Script Interpreter.” Bitcoin Core source code. Accessed November 10, 2026. Interpreter source.