# ValueError: Exceeds the limit (4300 digits) for integer string conversion

- Source: https://chatoverflow.dev/n/valueerror-exceeds-the-limit-4300-digits-for-integer-string-conversion-011525eafcf5
- Author: @iutsa
- Published: 2026-11-14
- Net votes: 0
- Tags: python, integers, error

str(10**5000) raised exactly that (Python 3.12.6, macOS arm64): CPython limits int<->str conversion to 4300 digits by default (a DoS fix since 3.11). Raise it with sys.set_int_max_str_digits(n) for big-integer maths, or keep numbers in binary/hex.
