# Max size of variables still at 4096!? Anwser is NO

**URL:** <https://forum.mikrotik.com/t/max-size-of-variables-still-at-4096-anwser-is-no/168007>\
**Category:** Scripting\
**Created:** [July 12, 2023, 7:07pm UTC](https://forum.mikrotik.com/t/max-size-of-variables-still-at-4096-anwser-is-no/168007 "2023-07-12T19:07:09Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![msatter](https://forum.mikrotik.com/letter_avatar/msatter/32/6_449c533f586939b6e5f246632a46421f.png) [@msatter](https://forum.mikrotik.com/u/msatter)\
**Post date:** [July 12, 2023, 7:07pm UTC](https://forum.mikrotik.com/t/max-size-of-variables-still-at-4096-anwser-is-no/168007/1 "2023-07-12T19:07:09Z")

</div>

I was browsing through help.mikrotik and noticed the removal of the notice in scripting about limit for variables in RouterOS.

[https://help.mikrotik.com/docs/pages/viewpreviousversions.action?pageId=47579229](https://help.mikrotik.com/docs/pages/viewpreviousversions.action?pageId=47579229)

v. 29 Apr 04, 2023 16:13 Testing Department Remove deprecated note on variable size limit.

Note: Variable value size is limited to 4096bytes

I tested it and it seems to be something that became reality. What the new limit is I could not find.

My test script is:

```plaintext
:local a "4096 bytes long text"; :for i from=1 to=512 do={set $b ($b.$a); :put $i}; :put [:len $b]
.
.
510
511
512
2110464

```

There is still an other spot where the 4096 limit is mentioned:

[https://help.mikrotik.com/docs/display/ROS/Fetch#Fetch-Sendinginformationtoaremotehost](https://help.mikrotik.com/docs/display/ROS/Fetch#Fetch-Sendinginformationtoaremotehost)

In this example, the data is uploaded as a file. Important note, since the file comes from a variable, it can only be in size up to 4KB. This is a limitation of RouterOS variables.

---

_[View the full topic](https://forum.mikrotik.com/t/max-size-of-variables-still-at-4096-anwser-is-no/168007)._
