Boring Websites The Blog

Dwitter: the website for 140-character JavaScript demos

06 Nov 2026 · By the Boring Websites editors

Dwitter is a social network where every post is a program. Each submission, called a dweet, is at most 140 characters of JavaScript that draws onto a shared canvas, and the site runs it live in the browser so visitors watch an animation rather than read the code. It is worth a look because it turns a severe size limit into a creative sport, and the results range from blinking test patterns to rotating 3D scenes that seem impossible in the space.

The premise, stated on the site itself, is a dare. Dwitter.net asks what awesomeness a person can create when limited to only 140 characters of JavaScript and a canvas. The number is a deliberate echo of the old Twitter character cap, which is also where the name comes from. That one borrowed constraint is the entire design.

In brief

  • Every dweet is 140 characters of JavaScript, run live against a 1920 by 1080 canvas.
  • A tiny set of shorthand names does most of the heavy lifting, so the limit is tight but not hopeless.
  • The project is open source on GitHub under the Apache 2.0 license, which is part of why it has stayed online for years.
  • Its two most popular Hacker News appearances, the 2017 launch and a single 2020 dweet, both cleared 350 points.

What Dwitter actually is

Most single-purpose websites give the visitor one button or one fact. Dwitter gives them a text box and a running clock. A dweet is a short animation defined entirely by code, and the site is the gallery, the editor, and the playback engine at once. Nothing is pre-rendered. What a visitor sees is the program actually executing.

Visitors can scroll an endless feed of these animations, each looping in its own frame, without ever opening the source. That makes it readable as pure spectacle. The code is there for anyone who wants it, but the front page works even if a person never clicks into a single listing. In that sense it is two sites in one: a casual gallery and a programming playground, sharing the same wall.

The original Hacker News post from February 2017, titled a social network for short JavaScript demos, framed it exactly that way and drew 361 points of discussion, as recorded in the archived thread. The comments there are an early snapshot of people realizing how much fits in so little, and arguing about whether the limit was cruel or brilliant.

The answer, years later, is that it was both, and that is the point. A gentler limit would produce ordinary little sketches. The brutal one produces ingenuity, because the only way through is to be clever with every character.

The 140-character rule, and the toolbox that makes it survivable

A plain 140 characters of JavaScript would barely fit a single drawing command, let alone an animation. Dwitter makes the constraint playable by predefining a handful of very short names, so authors spend their budget on ideas rather than boilerplate. The site documents these directly in its editor, where they sit a click away from the code box.

The canvas and its context

Two of the most used names are the single letters c and x. As the editor explains, c is a 1920 by 1080 canvas and x is a 2D context for that canvas. Because both are already created and sized, an author can start calling drawing methods on the very first character rather than spending twenty of them wiring up a canvas element by hand.

The time variable

The other pillar is t, the time value handed to the loop. It starts at zero and advances a little on every frame, so any expression built from t becomes motion. A circle whose position depends on t moves on its own. A color that depends on t pulses. Because of this, the first instinct of most authors is to find somewhere clever to put a t, and let the clock do the animating for free.

Trigonometry and color, abbreviated

The site also aliases the common math. The names S, C, and T stand in for sine, cosine, and tangent, the functions that turn a steadily rising number into smooth back and forth motion. A color helper named R builds an rgba string, documented in the editor as usage such as R(255, 255, 255, 0.5). Those few shortcuts are the difference between the limit being hopeless and being a game, because sine and cosine are how a single growing number becomes an orbit, a wave, or a spin.

How a dweet runs

Each dweet is wrapped in a function the site calls once per frame. The author writes the body, and Dwitter calls it roughly sixty times a second, handing in the current value of t. The canvas is not automatically wiped between frames, so clearing it, or deliberately not clearing it, is a creative choice that costs characters either way.

This loop model is why the feed feels alive. Nothing is a static image. A dweet that draws one rectangle still redraws that rectangle sixty times a second, and the moment the author ties any value to t, the rectangle starts to breathe. Leaving the canvas uncleared, by contrast, lets each frame paint over the last, which is how many of the site's smoke, trail, and fractal effects are produced with almost no code.

The practical effect is that authors learn to think in terms of a single frame as a function of time. Given the clock, where should every pixel be right now. That framing is close to how shader art and demoscene intros are written, which is part of why the site attracts people from those communities. A dweet is essentially a one-line shader expressed in ordinary canvas calls.

It also explains why reading a dweet backward, from its output to its code, is such a good puzzle. The visible motion is the only hint. Working out which part of those 140 characters produced a given wobble is a small act of reverse engineering, and the feed is an endless supply of them.

The culture of code golf

Dwitter sits in a long tradition called code golf, where the goal is to solve a problem in the fewest characters possible. Here the problem is open ended, which makes it less about a single correct answer and more about squeezing surprising visuals into the space. The scorecard is not character count alone. It is the gap between how little code there is and how much happens on screen.

The clearest example of how far that goes is a dweet titled a Stargate in 140 characters of JavaScript, posted to Hacker News in November 2020. It renders a shimmering ring reminiscent of the film prop, entirely inside the limit, and the discussion reached 377 points as people picked apart how the trick was done. The dweet itself still plays at its listing, dwitter.net/d/20584, and it holds up as a demonstration that the ceiling is much higher than the limit suggests.

Threads like that are the real engine of the site. A striking dweet gets reverse engineered in the comments, someone shaves two characters off it, and the freed budget funds a new flourish. The constraint turns casual viewing into a collaborative puzzle that anyone with a little curiosity can join, whether or not they ever post.

This culture rewards a particular kind of knowledge: not big frameworks, but small tricks. A compact way to loop over pixels. A formula that fakes perspective in a few symbols. A math identity that saves three characters. On most platforms those tricks are trivia. On Dwitter they are currency.

Who built it, and why it stays online

Dwitter is not a company product. Its source lives in a public repository, github.com/lionleaf/dwitter, where GitHub records it as created in December 2015, written mainly in JavaScript, and carrying roughly 806 stars. The repository describes itself in almost the same words the site uses, a social network for short js demos, which keeps expectations honest.

Crucially, it is released under the Apache 2.0 license, a permissive open source license that lets anyone read, run, and build on the code. That matters for longevity. A hobby site owned by one person can vanish the day that person loses interest or stops paying the hosting bill. An open codebase can be understood, forked, and in principle revived by others, which lowers the odds of a quiet disappearance and reassures the people who invest hours learning its quirks.

The open repository also demystifies the magic. Anyone curious about exactly how the 140-character limit is enforced, or how the canvas and the time loop are wired together, can read the implementation rather than guess at it. The documented shorthand on the live site and the code behind it line up, so there is no hidden layer to be suspicious of.

There is a quieter benefit too. Because the rules are public and fixed, a dweet written today will still run the same way years from now. The platform does not drift under the authors, which is rare on a web where the ground usually moves.

How to read, remix, and write your own

A good first move is passive. Open the feed and watch for a minute. The animations loop, so a confusing one will come back around, and the ones that catch the eye are usually the ones worth opening. There is no wrong way to browse, and no penalty for not understanding anything yet.

The second move is to open a dweet and read its 140 characters with the toolbox in mind. Spotting a t inside a sine call, written with the letter S, is usually the key to understanding why something sways or spins. Once a reader can trace one value from the clock to a pixel on screen, most dweets stop looking like noise and start looking like sentences.

The third move is to edit. Dwitter lets a visitor change the code in the box and see the result immediately, so nudging a number in an existing dweet is the lowest risk way to learn. Double a value, watch the motion speed up, and the abstract suddenly becomes concrete. Nothing breaks, and the original is untouched until a person deliberately saves.

Posting a brand new dweet does require a free account, as the editor notes when it prompts a person to log in or register before saving, and it helpfully suggests copying the code somewhere safe in the meantime. Experimenting in the box, though, needs no sign-up at all, which means the entire learning loop is open to anyone who lands on the page.

What 140 characters can and cannot do

It would be easy to oversell the format, so it is worth being plain about the ceiling. A dweet cannot load an image, pull in a library, or stream a sound file, because there is no room and no mechanism for it. Everything on screen is drawn from scratch, frame by frame, out of math and canvas calls. That is the source of both the charm and the difficulty.

Within those walls, though, the range is wider than newcomers expect. Authors fake 3D by projecting points onto the flat canvas with a little trigonometry, using the S and C aliases to rotate a cloud of coordinates. They imply depth with color and size rather than real geometry. They build what look like particle systems by redrawing hundreds of tiny shapes whose positions all derive from the single t value and an index.

The limits also shape the aesthetic. Because detailed artwork is out of reach, dweets lean into motion, repetition, and pattern, the things that read instantly and compress well into code. A rule that rewards rhythm over realism tends to produce work that feels closer to music visualizers or screensavers than to illustration.

Knowing the boundary makes the standout dweets more impressive, not less. When something inside 140 characters looks like it should not be possible, the reaction in the Hacker News threads is usually the same, a mix of admiration and a scramble to work out exactly where the illusion is hiding.

Why it belongs in the boring-website canon

Dwitter is boring in the specific sense this site cares about. It does one thing, it does not chase the visitor for an email, and it rewards attention rather than demanding it. The entire concept fits in a sentence, yet the output is effectively endless because it is generated by people rather than curated into a fixed list that eventually runs out.

It also pairs naturally with the rest of the small-web world of generative toys. Anyone who enjoys watching code make pictures can wander from here to something like Sandpile, which turns a single mathematical rule into slowly spreading art. Both share the same quiet thesis, that a strict rule and a blank canvas are enough, and that the constraint is the feature rather than the compromise.

Years after its biggest moments on Hacker News, the feed is still moving, the editor still runs, and the limit is still 140 characters. For a format built on a dead character count borrowed from another website, that is a stubborn kind of survival. It is also a small argument that the web is more fun when someone draws a hard line and dares people to work inside it.

FAQ

What is a dweet?

A dweet is a single post on Dwitter: at most 140 characters of JavaScript that draws an animation on a 1920 by 1080 canvas. The site runs it live and loops it, so a dweet is experienced as a short moving image rather than as code, unless a visitor chooses to open it and read the source.

Do I need to know JavaScript to enjoy Dwitter?

No. The feed plays every dweet automatically, so it works as a gallery of animations with no coding at all. Knowing a little JavaScript simply adds a second layer: it lets a visitor read the 140 characters, understand the trick, and start editing values to see what changes.

Why 140 characters?

The number is a nod to the original Twitter limit, which is also where the name Dwitter comes from. The cap is the whole point. It turns writing a visual into a constrained puzzle, closer to code golf than to ordinary programming, and that difficulty is exactly what makes a clever dweet impressive.

Is Dwitter free and open source?

Yes. Viewing and editing in the box are free, and posting needs only a free account. The project's source is public on GitHub at github.com/lionleaf/dwitter under the Apache 2.0 license, which allows anyone to read, run, and reuse it. That openness is a large part of why the site has lasted.