I think any solution will have a certain level of pain. JavaScript stores numbers as 64bit and in some of it's calculations with integers will use 32bit.
If you use JavaScript you could use a typed array of multiple 64bit numbers and then use the memory address of that with some asm.js or web assembly that can call a cpu instruction that works on 256bit numbers. However that probably isn't very cross platform.
Another option is to use a js library like this:
https://github.com/MikeMcl/bignumber.js/
But you still have to deal with numbers in a certain way.
Besides that you probably just need to use multiple numbers or text to store the number.