← Blog··Updated 7 Jun 2026·6 min read

Why JavaScript is called JavaScript (and has nothing to do with Java)

JavaScript was written in ten days in May 1995, shipped as LiveScript, and renamed JavaScript in December as a marketing co-branding deal with Sun. The name is a trademark, the language is unrelated to Java, and the standard had to be called something else entirely.

AI-assisted postDrafted with help from Claude, edited and fact-checked by Mart. See transparency policy →
Brendan Eich

Brendan Eich, who wrote JavaScript in ten days in May 1995. Photo: Darcy Padilla, CC BY-SA 3.0.

JavaScript is named after Java for the same reason a supermarket calls its budget cola Mountain Lightning: somebody wanted to ride a popular brand. The language was not derived from Java, does not share Java's object model, its memory model, its type system, or its design philosophy, and was not even written by the Java team. It was written by one person, Brendan Eich, in ten days in May 1995, under the name Mocha, shipped to the public as LiveScript, and renamed JavaScript in December 1995 as part of a co-marketing deal between Netscape and Sun Microsystems. The name has caused, by conservative estimate, three decades of confusion — and the most-quoted line about it, "Java is to JavaScript what car is to carpet," is the most accurate description anyone has produced.

Ten days in May

Brendan Eich joined Netscape in April 1995, recruited with the promise that he would get to put the Scheme programming language into the browser. Scheme is a clean, minimal Lisp dialect beloved by people who teach programming and largely ignored by everyone shipping consumer software. That promise did not survive contact with Netscape's management, who had decided two things: the browser needed a scripting language, and that language needed to look like Java so it would feel familiar to the working programmers Netscape wanted to attract.

So Eich was handed a contradiction. Build something with the dynamic, functional sensibility of Scheme and the cosmetic appearance of Java, and do it fast enough to make the Netscape Navigator 2.0 beta. The result was a prototype written in ten days, which is roughly the right amount of time to build a language you will regret and exactly the wrong amount of time to build one that a billion devices will run thirty years later. Both happened. The first-mover quirks Eich shipped under deadline — implicit type coercion, null versus undefined, the behaviour of this — are still in the language because the web is the longest-running backwards-compatibility contract in computing history.

The internal codename for this prototype was Mocha, chosen by Netscape co-founder Marc Andreessen. Mocha is, of course, a coffee drink — which is a small irony given that the language it would eventually be confused with, Java, was also named after coffee. The coffee theme in mid-1990s software naming was apparently in the water.

LiveScript, then JavaScript

When the Navigator 2.0 beta shipped in September 1995, Mocha had been renamed LiveScript. The Live prefix was Netscape house style at the time — LiveWire, LiveScript, a whole family of products gesturing at dynamism and interactivity. As a name it was honest: it described a scripting language that made pages live. It also had nothing to do with Java, which is the point worth holding onto, because what happened next was not a naming decision so much as a business deal.

On 4 December 1995, Netscape and Sun Microsystems issued a joint press release headlined "Netscape and Sun announce JavaScript, the open, cross-platform object scripting language for enterprise networks and the internet." Netscape was bundling Sun's Java into the browser as the technology for "heavyweight" applets. LiveScript was the "lightweight" scripting glue. Renaming LiveScript to JavaScript let the two companies present a single, coherent, marketable story: Java for the big stuff, JavaScript for the small stuff, both from the same allied camp, both with the same prefix. The fact that the two languages were technically unrelated did not matter to the announcement. The dot-com boom was starting, Java was the hot new language of 1995, and JavaScript borrowed that heat.

Eich himself has never pretended otherwise. He has described the JavaScript name as a marketing ploy, and the historical record agrees with him. This is one of the cleaner cases in software where a name was chosen by the marketing department over the objection of the engineer, and the marketing department was, commercially, completely right. LiveScript would not have ridden the Java wave. JavaScript did.

The car and the carpet

The confusion the name produces is so reliable that it has its own canonical one-liner. Developer advocate Chris Heilmann is the usual source for "Java is to JavaScript what car is to carpet" — the two words share a prefix and nothing else. It is funnier than the more common "Java is to JavaScript as ham is to hamster," and more accurate, because car and carpet are genuinely unrelated rather than merely different sizes of the same thing.

The technical reality is that JavaScript inherited far more from Scheme and from Self — a prototype-based language from Sun's own research labs — than from Java. From Scheme came first-class functions and closures, the features that made JavaScript quietly a functional language wearing a C-family costume. From Self came the prototype-based object model, where objects inherit directly from other objects rather than from classes. The Java contribution was almost entirely syntactic: curly braces, the var keyword, C-style for loops, the general shape of an expression. Java gave JavaScript its clothes. Scheme and Self gave it its skeleton.

That mismatch — Java syntax over Scheme-and-Self semantics — is the source of most of the surprise JavaScript generates in people who assume the name means what it appears to mean. They expect Java's class-based inheritance and find prototypes. They expect Java's static typing and find aggressive runtime coercion. The name set an expectation the language was never built to meet.

Why the standard is called ECMAScript

Here is the part that makes the trademark story explicit. When the language was submitted for standardisation in late 1996, the standards body could not call the standard JavaScript, because JavaScript was a trademark. The mark was issued to Sun Microsystems and later — when Oracle acquired Sun in 2009 — passed to Oracle, which holds it to this day. The trademark was formally registered to Sun on 6 May 1997. A standards document cannot bear a name owned by one of the commercial parties at the table, especially when the other party at the table was Microsoft, whose disputes with Netscape dominated the early sessions.

So the standard was named after the organisation that hosted it. Netscape took the language to Ecma International — at the time still spelled ECMA, an acronym for the European Computer Manufacturers Association, later lowercased to Ecma when the organisation outgrew both Europe and the manufacturing focus. The committee that took ownership was, and remains, Technical Committee 39 — TC39. The first edition of the standard, ECMA-262, was adopted by the Ecma General Assembly in June 1997. The language it specified was called ECMAScript because JavaScript was unavailable and JScript — Microsoft's name for their reimplementation — was also a trademark, this time Microsoft's.

The naming layer cake is now three deep. JavaScript is the trademarked name most people use. ECMAScript is the standard, named to avoid the trademark. JScript was Microsoft's trademark-dodging name for their own implementation in Internet Explorer. The version numbers people throw around — ES6, ES2015, ES2024 — are ECMAScript editions, not JavaScript versions, because JavaScript has no version numbers; it is a brand, not a spec. This is the same trademark-driven rename that forced SQL's spelling change four decades earlier, where a British aerospace company's mark on SEQUEL pushed IBM to drop the vowels — covered in the SQL pronunciation post. Naming under legal duress is a recurring pattern, not a one-off.

TC39 and the lineage

TC39 is the reason JavaScript stopped being one company's product and became a living standard. The committee's membership is the browser vendors plus the large platform companies plus a rotating cast of implementers and academics, and its process — proposals advancing through stages 0 through 4 — is the mechanism by which a feature goes from idea to shipped syntax. Every async/await, every arrow function, every optional-chaining ?. you have typed came through that pipeline.

The committee's existence is also why the language survived the deal that named it. Netscape lost the browser war. Sun was absorbed by Oracle. The marketing alliance that produced the name JavaScript dissolved entirely. But the standard outlived all of them, because it had been handed to a neutral body with a process, rather than remaining the property of any single vendor. The trademark still belongs to Oracle, which is why — in a detail that delights people who enjoy this sort of thing — Oracle owns the name of a language it did not write, does not maintain, and has only a tangential commercial interest in. There have been periodic, semi-serious campaigns asking Oracle to release the trademark, so far without success.

A short close

The language was built in ten days to look like Java and behave like Scheme, shipped under a name that described what it did, and then renamed to ride the coattails of an unrelated language because the marketing made the deal cleaner. The engineer who wrote it called the name a marketing ploy and was right. The standard had to invent a third name to sidestep a trademark, and that third name — ECMAScript — is the one the spec uses and almost nobody says out loud. Thirty years on, the name still generates a steady supply of confused job interviews and a permanent demand for the line about the car and the carpet. The confusion is not a bug in how people understand JavaScript. It is baked into the name, on purpose, by people who knew exactly what they were doing.

Read next