CrescentHandbook
Lightweight card
Cards

The Lightweight card

Make a website, app, program, etc. that’s under 5 KB! You can use compression, minification, etc!

Make a website or an app that is under 5 KB.

The size limit, precisely

Your target is 5 KB. Try to reach it, or go under it!

If you get 6 or 8 KB, that’s still pretty small, so we’ll probably accept your project. We’d say that 16 KB is the hard ceiling! …but if you ship a sick game that’s 64 KB like kkrieger, we’d probably still accept it.

It’s also important to say… no cheating! Ya can’t download a 30 MB file from a 5 KB file and say it counts…!

Websites

The web is the easiest place to start, because the browser forgives a surprising amount! For example: did you know that you can write <p>, not close it, and the browser will close it for you? How splendid!

Now… you’re probably gonna want to write it by hand. Frameworks are big! React and its runtime are already several times over budget. A single .html file works perfectly here!

…and there’s plenty of tricks you can use:

  • Drop the optional tags. HTML does not need </p>, </li>, </td>, </tr>, <html>, <head> or <body>. The parser puts them back. Quotes around attribute values are optional when the value has no spaces.
  • Minify the JavaScript, then look at what the minifier could not do: long identifiers inside strings, repeated patterns…
  • Really small class names. Why call something my-cool-div when you can simply call it m?

Try looking up js1k and js13k, competitions built entirely on this constraint. The entries are a good education in what fits in a few kilobytes, which is much more than you would guess!

Windows executables

Making small binaries is a bit trickier, but oh so so so much fun. The compiler is your problem here, not your code. A default MSVC or GCC build wastes most of its size on runtime and headers before your program does anything.

  • Crinkler is the tool for this: a linker and compressor built for REALLY small executables!
  • Do not link the C runtime. This might sound scary, but Windows provides a lot of the functions you’d usually need. Usually the runtime is baked into the binary, but Windows functions are, well, part of Windows!
  • No libraries. They usually have lots of stuff you don’t need!
  • UPX is also a good choice! It compresses executables, unpacks them on the fly, and saves you a lot of bytes.

Linux executables

Same thing as Windows, we just need to use different tools!

  • Compile with -Os, strip everything, and turn off the things that are silently included: -nostdlib, -fno-asynchronous-unwind-tables, -fno-stack-protector, -static.
  • Syscalls directly instead of libc. Talk to the kernel directly!
  • Hand-write the ELF header if you’re hardcore. I’ll be very impressed if you go THIS far…

Everywhere else

There’s many different interpretations you can have of this card!

  • A PICO-8 cart does count, and is size-limited by design.
  • An uxn or WASM-4 ROM are other fantasy consoles you can try!
  • A bootsector program. If you make one, I’ll personally give you a strong, warm handshake and a “waow!”
  • A QR code that contains the whole program. You can put 4 KB of HTML into one!

What to put in your README

  • The final size, how you measured it, and whether it is compressed. You can give your figures as compressed by gzip or Brotli! …but it’s so much cooler if it’s uncompressed.
  • The trickery you’ve used!
Last updated 23 Sept 2026