# What is the maximum IPFS block size

**URL:** <https://discuss.ipfs.tech/t/what-is-the-maximum-ipfs-block-size/12453>\
**Category:** Help\
**Created:** [October 16, 2021, 6:01pm UTC](https://discuss.ipfs.tech/t/what-is-the-maximum-ipfs-block-size/12453 "2021-10-16T18:01:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zacharywhitley](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/zacharywhitley/32/2670_2.png) [@zacharywhitley](https://discuss.ipfs.tech/u/zacharywhitley)\
**Post date:** [October 16, 2021, 6:01pm UTC](https://discuss.ipfs.tech/t/what-is-the-maximum-ipfs-block-size/12453/1 "2021-10-16T18:01:15Z")

</div>

I know that locally it can be anything you want but bit swap needs it to be some under some maximum size or they’re rejected. I’m asking because I’ve seen reference two different numbers out there, 1m, 2m, 4m, and others. I’m assuming that it was changed to be larger at some point and some of the others references are just incorrect.

Thanks.

---

<div class="post-metadata">

**Author:** ![adin](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/adin/32/2679_2.png) [@adin](https://discuss.ipfs.tech/u/adin)\
**Post date:** [October 17, 2021, 12:06am UTC](https://discuss.ipfs.tech/t/what-is-the-maximum-ipfs-block-size/12453/2 "2021-10-17T00:06:49Z")

</div>

To be safe:

- Data should not be created with blocks larger than 1MiB
- Data transfer protocol implementations should be able to process blocks at least 2MiB

---

<div class="post-metadata">

**Author:** ![zacharywhitley](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/zacharywhitley/32/2670_2.png) [@zacharywhitley](https://discuss.ipfs.tech/u/zacharywhitley)\
**Post date:** [October 18, 2021, 6:36pm UTC](https://discuss.ipfs.tech/t/what-is-the-maximum-ipfs-block-size/12453/3 "2021-10-18T18:36:34Z")

</div>

What if I wanted to live dangerously? I’m assuming there’s a preference for fewer full blocks.

---

<div class="post-metadata">

**Author:** ![adin](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/adin/32/2679_2.png) [@adin](https://discuss.ipfs.tech/u/adin)\
**Post date:** [October 18, 2021, 11:17pm UTC](https://discuss.ipfs.tech/t/what-is-the-maximum-ipfs-block-size/12453/4 "2021-10-18T23:17:47Z")

</div>

Living dangerously is a bit dangerous for my tastes 😁. I’m not sure what the largest you could possibly send via the current go-bitswap implementation is, but I wouldn’t rely too heavily on it.

> I’m assuming there’s a preference for fewer full blocks.

How files are chunked up into blocks is situational and has a number of variables involved such as parallelization of requests, duplicate data received, how many CIDs to advertise (particularly if you want random access into the chunks of your files), data deduplication, and probably a few more that I’m missing.

If you’re really concerned about block sizes I’d do some rough benchmarking with your datasets and use cases to see what makes sense, or see what other folks have done with use cases similar to yours. I’d be wary of exceeding the safe limits without good evidence of how much it’ll help you though since it may not be worth the pain of potential breakage in the future.
