git404hub

what is jsfuck fr?

aemkei/jsfuck — explained in plain English

Analysis updated 2026-06-24

8,587JavaScriptAudience · developerComplexity · 1/5Setup · easy

tl;dr

A JavaScript curiosity that proves any program can be written using only six characters, an educational experiment revealing how JavaScript silently converts between types.

vibe map

mindmap
  root((jsfuck))
    What it does
      JS encoding
      Six chars only
      Type coercion demo
    Tech Stack
      JavaScript
    How it works
      Array coercions
      String building
      Function access
    Use Cases
      Education
      Language internals
      Esoteric coding

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Convert any JavaScript snippet into JSFuck encoding to see how type coercion builds up values from nothing

VIBE 2

Study the library source to learn how JavaScript handles automatic type conversion between numbers, strings, and arrays

VIBE 3

Use the live demo at jsfuck.com to encode small scripts for educational experiments or puzzles

what's the stack?

JavaScript

how it stacks up fr

aemkei/jsfucktiddlywiki/tiddlywiki5jamiebuilds/itsy-bitsy-data-structures
Stars8,5878,5878,578
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasyeasyeasy
Complexity1/52/51/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min

in plain english

JSFuck is an experiment that proves you can write any JavaScript program using only six characters: [, ], (, ), !, and +. The result looks nothing like normal code. A simple alert(1) turns into dozens of lines of brackets and plus signs. Despite looking like noise, it executes correctly in any standard JavaScript environment, including browsers and Node.js. The project works by exploiting how JavaScript handles type conversions. JavaScript freely converts between numbers, strings, booleans, and arrays depending on context. For example, an empty array [] treated as a number becomes zero, and treated as a string becomes an empty string. By carefully combining these coercions with the handful of allowed characters, you can build any digit, any letter, and eventually any string or function call. The README walks through each step: how to get the number 1, how to get the word undefined, how to extract individual characters from that word, and how to eventually build method names like filter or constructor that let you run arbitrary code. This is described as an esoteric and educational project. Esoteric means it is intentionally impractical, more of a curiosity or puzzle than something you would use in real software. Educational means studying it reveals real things about how JavaScript's type system works under the hood, which is why it has attracted attention from developers curious about language internals. The library includes a conversion function so you can input any JavaScript code and get the JSFuck equivalent out. A live demo is available at jsfuck.com. The README is detailed, explaining the logic behind each character and each step in building up from simple values to complete programs.

prompts (copy fr)

prompt 1
Using JSFuck's logic, explain step by step how JavaScript builds the number 1 and the letter 'a' from only brackets, parentheses, exclamation marks, and plus signs.
prompt 2
I want to encode a small JavaScript function using the JSFuck library. Show me how to call the conversion function and explain what the output represents.
prompt 3
Help me understand how JSFuck constructs a function call like alert(1) purely from type coercions, walk me through each stage from empty array to executable code.

Frequently asked questions

what is jsfuck fr?

A JavaScript curiosity that proves any program can be written using only six characters, an educational experiment revealing how JavaScript silently converts between types.

What language is jsfuck written in?

Mainly JavaScript. The stack also includes JavaScript.

How hard is jsfuck to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is jsfuck for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.