Subscribe to Make Magazine Today!

It’s a common problem we’ve all faced. Sometimes 140 just isn’t enough.

What do you do when your carefully crafted Tweet is too profound to fit in the infernal 140 character limit? What if nothing short of 141 characters will do? You upgrade your browser to enable advanced Twitter compression, that’s what.

var trep = [[ “^”, “^ ” ], [ “with the “, “^wt ” ],[ “that the “, “^tt ” ],[ “check out “, “^co ” ],[ “in the “, “^nth ” ],[ “of the “, “^ot ” ], [ “at the “, “^at “], [ “isn’t “, “^int ” ], [ “cool “, “^c ” ], [ “neat “, “^nt ” ],[ “when “, “^w ” ],[ “with “, “^wi ” ], [ “that “, “^h ” ], [ “this “, “^s ” ], [ “the “, “^e ” ], [ “day “, “^d ” ], [ “are “, “^r ” ], [ “and “, “^n ” ] ];

function tcomp( input )

   var temp = input;
   for ( var x=0; x<trep.length; x++ )
     temp = temp.replace( new RegExp( trep[x][0].replace(/^/g,”\^”).replace(/’/g,”\'”), “g” ), trep[x][1] );
   return temp;

function tdecomp( input )

   var temp = input;
   for ( var x=trep.length-1; x>=0; x– )
     temp = temp.replace( new RegExp(trep[x][1].replace(/^/g,”\^”).replace(/’/g,”\'”), “g”), trep[x][0] );
   return temp;


The tcomp and tdecomp functions will transform your Tweet into a highly compressed, but mostly human readable format. It involves a lot of super secret mathematics that I’m not allowed to talk about, but suffice it to say that you can save a whole character or two in most Tweeting scenarios. The best part is that dynamic power carrot coding mechanisms ensure that you’ll look good in the process. Trust me.

Below are two bookmarklets. Don’t click on those here – instead, drag them to your bookmarks bar. In Twitter, type your slightly too-long message and then run the compress status bookmarklet to compress the input field. If you see other people posting compressed messages, either translate in your head, or click the decompress feed bookmarklet to decompress the entire contents of the stream you are viewing.

Bookmarklet: compress status
Bookmarklet: decompress feed

  • Mike Mc

    Wow! I was skeptical at first, but this really works !! This has totally transformed my ability to tweet larger messages. fantastic!

  • untergeek

    Twitter is all about limiting yourself. This is like buying a laptop then glueing it to your desktop so nobody can steal it.

  • Jason

    140 character limit always bothered me. 141 is great; although, sometimes I need 142. This gives me a great idea to create a LZW compression implementation for twitter so that I can really push the boundaries of my tweet.

  • Gary Niger

    Why don’t you use MD5 compression? People would only post the MD5 checksum of their messages, and the browser would automatically guess the message from the posted checksum and display that.

    I know what you’re going to say: MD5 collisions. But since an MD5 checksum is only 32 characters, there is plenty of space for eg. an additional SHA1 checksum. Problem trivially solved, as there are no combined MD5+SHA1 collisions known to man. And it’s going to be cryptographically solid for quite a while, since it’s not like anything on Twitter actually creates information.

  • Anonymous

    this shit does not fucking work. this shit does not fucking work, update the browser my ass.

  • Nathan

    I like the idea of using bookmarklets! Another approach is to try an online Tweet Compressor.