What's the character limit for MySQL TEXT data type?

Hey everyone! I’m working on a private messaging system and I’m stuck on something. I need to set up a textarea for users to write their messages, but I’m not sure how to limit the input.

I know I’m using a TEXT field in my MySQL database to store these messages. But I can’t seem to find a clear answer on how many characters it can hold. Does anyone know the maximum capacity?

Also, I was wondering if there’s a way to specify a custom length for the TEXT field, kind of like how we can do with VARCHAR. Is that possible?

Thanks in advance for any help! I really want to make sure users don’t accidentally write messages that are too long for the database to handle.

hi finn, text fields hold 65,535 chars only. if u need more space, try mediumtext or longtext. custom lengths? no can do. use some js on the client side to limit inputs, ya know? cheers!