I am trying to mint the token using this command. to testnet.

cardano-cli transaction build-raw \
> --fee 188865 \
> --tx-in 540f0a1e27b64da69059d8b5ff22c542a53d31d5f01fedc6a0094879efb7152d#0 \
> --tx-out $(cat payment.addr)+4811135+"1000 $(cat policy/tokens/policy.id).eduladderTestCoin"+"1000" \
> --mint="1000 $(cat policy/tokens/policy.id).eduladderTestCoin"+"1000" \
> --minting-script-file policy/tokens/token_policy.script \
> --metadata-json-file policy/tokens/token_meta.json \
> --out-file token_tx.raw

When I am trying to do that I am getting this error. Command failed: transaction build-raw Error: Error reading metadata at: "policy/tokens/token_meta.json" Value out of range within the metadata item 721: {"c5edbeaed052fa6e3e3f1ced8e39fdb9900b910622ead746ee938cff":{"eduladderTestCoin":{"name":"eduladderTestCoin","image":"ipfs://bafkreifuidzqzsol7lcf7km6od7723qln2aw7xlf4xyvx2t2bgwnbf2wum"}}} Text string metadata value must consist of at most 64 UTF8 bytes, but it consists of 66 bytes. What does this means and how will i debug the same?

3 Answers 3


As the error says:

Text string metadata value must consist of at most 64 UTF8 bytes

You can't use more than 64 UTF8 bytes in a value in the metadata.

In this case the problem is because your IPFS CID is V1, instead of V0. Take a look in the Identifiers formats.

So in this case you've some options:

  1. Use an array to specify the image if you continue using V1.
  2. Generate a CID V0, which is shorter
  3. Use another storage solution with a shorter URI

Either way, try to follow the NFT Metadata standard, which defines that the metadata should specify the URI, that means, don't remove the ipfs:// part.

Anyway, it'll be stored in the blockchain, that doesn't matter, but maybe some websites won't display correctly your asset.


Removing ipfs from this has solved the problem.


The result is:"image":"bafkreifuidzqzsol7lcf7km6od7723qln2aw7xlf4xyvx2t2bgwnbf2wum"}}}

  • 1
    That's not right.. You have something else wrong if that patched your problem as it should not have been required to remove that. If you want to paste the full metadata contents in I can help sort out what's going on.
    – Tygar Pool
    Feb 27, 2022 at 13:14
  • please paste the full metadata which is given above in the question.
    – arunwebber
    Feb 27, 2022 at 13:59

I am having a very similar issue although with a different erorr.

Text string metadata value must consist of at most 64 UTF8 bytes, but it consists of 70 bytes.

It makes complete sense why removing the first "ipfs://" from that string allows it to work. It's just a coincidence that the string becomes less than 64 characters, allowing it to work.

I've tested this out with multiple fields in the metadata, and all it always works so long as the string is not greater than 64 characters.

This is obviously an issue as most ipfs links are longer than 64 characters. Any ideas on a solution?

  • in pool.pm the image is shown after i removing the ipfs part too but i am wondering will this work correctly in block chain or not in live server?
    – arunwebber
    Mar 8, 2022 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.