You can absolutely upload code to Squarespace! In fact, Squarespace is built on top of a robust code foundation, so you can rest assured that your site will be able to handle anything you throw at it.
That said, there are some limitations to what you can do with code on Squarespace. For example, you can’t modify the core Squarespace templates or functionality. And while you can add custom code to your site, it’s important to remember that Squarespace provides limited support for custom code.
If you’re comfortable working with code and are willing to troubleshoot any issues that may arise, then uploading code to Squarespace is a great way to get the most out of your site. Just be sure to thoroughly test your code before making it live on your site.