# Id size check

**URL:** <https://discuss.elastic.co/t/id-size-check/291870>\
**Category:** Elasticsearch\
**Created:** [December 14, 2021, 8:39pm UTC](https://discuss.elastic.co/t/id-size-check/291870 "2021-12-14T20:39:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thinkdffrnt](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@thinkdffrnt](https://discuss.elastic.co/u/thinkdffrnt)\
**Post date:** [December 14, 2021, 8:39pm UTC](https://discuss.elastic.co/t/id-size-check/291870/1 "2021-12-14T20:39:09Z")

</div>

`_id` is limited to 512 bytes in size and larger values will be rejected

How can I check the bytes size in Java? Is this UTF 8 encoding? I can't find any info

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 11, 2022, 8:40pm UTC](https://discuss.elastic.co/t/id-size-check/291870/2 "2022-01-11T20:40:03Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
