<p>There isn't a limit described by the BIP (<a href="https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki" rel="nofollow noreferrer">https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki</a>). In general, however, URIs might be encoded into QR codes, so their length should be kept as small as possible. </p>

<p>GET requests often have limits on the length of the encoded URLs, something like 2000 characters (<a href="https://stackoverflow.com/questions/266322/is-there-a-limit-to-the-length-of-a-get-request">https://stackoverflow.com/questions/266322/is-there-a-limit-to-the-length-of-a-get-request</a>). This might be applicable depending on how you are using the URI.</p>

<p>As a guideline, however, I would say that messages in Bitcoin URIs should be fairly short. I'd probably try to stick to less than 200 characters.</p>

CC BY-SA 3.0
2015-01-13T04:01:00.100Z
2015-01-13T04:06:10.467Z
2017-05-23T12:34:59.703Z
morsecoder
<p>Is there a limit to how many characters are allowed in the message parameter of a <a href="https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki" rel="nofollow">BIP21</a> URI? I tried searching on the subject, but found nothing about it.</p>

CC BY-SA 3.0
2015-01-13T03:26:53.500Z
Could you be more specific about where you're trying to embed a message? Is it inside an OP_RETURN, inside a coinbase, or as a 160 bit hash?
Nick ODell
CC BY-SA 3.0
2015-01-13T03:46:13.047Z
Via URI Scheme for the block chain.
Anderson Juhasc
<transactions><message><bip21-uri>
Does the bitcoin URI message parameter have character limits?
Anderson Juhasc
# Does the bitcoin URI message parameter have character limits?

(Asked by: username_0 on 2015-01-13)

Is there a limit to how many characters are allowed in the message parameter of a [BIP21](https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki) URI? I tried searching on the subject, but found nothing about it.

**Tags:** transactions, message, bip21-uri

> **Comments:**
> **username_1**: Could you be more specific about where you're trying to embed a message? Is it inside an OP_RETURN, inside a coinbase, or as a 160 bit hash?  
> **username_0**: Via URI Scheme for the block chain.  

---

## 1 answers

### Answer by username_2 on 2015-01-13. Score: 4

There isn't a limit described by the BIP (<https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki>). In general, however, URIs might be encoded into QR codes, so their length should be kept as small as possible.

GET requests often have limits on the length of the encoded URLs, something like 2000 characters (<https://stackoverflow.com/questions/266322/is-there-a-limit-to-the-length-of-a-get-request>). This might be applicable depending on how you are using the URI.

As a guideline, however, I would say that messages in Bitcoin URIs should be fairly short. I'd probably try to stick to less than 200 characters.


---

