Free JavaScript Books: Legally Free JavaScript and TypeScript Books, Beginner to Advanced
A curated list of free JavaScript books and free TypeScript books you can read legally online, from your first console.log to closures, async code, functional programming, Node.js, design patterns and advanced type-level TypeScript. Each entry says who it is best for, its level and how it is licensed, so you can pick one good book instead of collecting fifty bookmarks.
Last reviewed: December 2026. “Free” means free to read online or download from an official source (author, publisher, project docs, open license) at the time of review. Several of these are also sold in print; buying one supports the author.
Table of Contents
- Quick Picks
- What Counts as Legally Free
- Reading Paths with Time Estimates
- Level 1: Absolute Beginner
- Level 2: Core JavaScript in Depth
- Level 3: Functional Programming in JavaScript
- Level 4: Patterns, Architecture and Clean Code
- TypeScript Books and Guides
- Node.js and Server-Side JavaScript
- The Browser, the DOM and Web Performance
- Frameworks: Official Guides That Read Like Books
- The Specification and References
- Free Courses and Practice
- Excellent Paid Books (Clearly Marked)
- Changes and Removals Worth Knowing
- Comparison: Which First JavaScript Book
- Practice Projects to Do Alongside the Books
- FAQ
- Where to Go Next
- Contributing
- License
Quick Picks
| You are… | Best free pick | Why |
|---|---|---|
| New to programming | Eloquent JavaScript, 4th ed. | A real programming book: values, functions, data structures, then projects. Free HTML, PDF and EPUB. |
| Want a step-by-step modern tutorial | The Modern JavaScript Tutorial | Covers the language from basics to promises, modules, classes, generators, then the browser. Kept current. |
| Know the basics, want deep understanding | You Don’t Know JS Yet | Scope, closures, this, objects, explained from the engine’s point of view. |
| Need reference, not narrative | MDN JavaScript Guide | The web’s standard documentation. |
| Learning TypeScript | The TypeScript Handbook | Official, concise, always matches the current compiler. |
| Going deep on TypeScript | TypeScript Deep Dive and Total TypeScript Essentials | Practical depth: configuration, narrowing, generics, real-world patterns. |
| Functional style | Mostly Adequate Guide to Functional Programming | Composition, currying, functors, monads, with humor. |
| Full-stack web job | Full Stack Open | Free university course text: React, Node, Express, MongoDB, GraphQL, TypeScript, testing, CI. |
What Counts as Legally Free
Only books made free by their authors, publishers or official projects are listed:
- Open license (Creative Commons or similar).
- Free to read online, all rights reserved - read freely on the official site; don’t re-upload.
- Official documentation that is structured enough to read like a book.
We do not link to “free PDF” mirror sites. If something here stops being free, please open an issue.
Reading Paths with Time Estimates
About an hour a day, five days a week, including exercises.
Path A: Complete beginner to confident JavaScript (10 to 14 weeks)
| Weeks | Read | Do |
|---|---|---|
| 1-4 | Eloquent JavaScript, chapters 1-11 | Every exercise in the in-browser sandbox. |
| 5-7 | javascript.info, Part 1 sections you found hard | Do the tasks at the end of each article. |
| 8-10 | javascript.info, Part 2 (browser, DOM, events) | Build a to-do app with no framework. |
| 11-14 | You Don’t Know JS Yet: Get Started and Scope & Closures | Explain closures and this in writing, in your own words. |
Path B: Programmer from another language (3 to 5 weeks)
| Week | Read | Do |
|---|---|---|
| 1 | MDN JavaScript Guide | Port a small program you know well. |
| 2 | javascript.info chapters on promises, async/await, modules | Write a small fetch-and-cache client. |
| 3 | TypeScript Handbook | Convert your port to TypeScript with strict on. |
| 4-5 | Node.js Learn and Node.js Best Practices | Build a small HTTP API with tests. |
Path C: JavaScript developer to strong TypeScript (6 to 8 weeks)
| Weeks | Read | Do |
|---|---|---|
| 1-2 | TypeScript Handbook | All examples in the TypeScript Playground. |
| 3-4 | Total TypeScript Essentials | Exercises in each chapter. |
| 5-6 | TypeScript Deep Dive | Migrate one JS project to TS. |
| 7-8 | type-challenges | Do all “easy” and most “medium” challenges. |
Path D: Full-stack web (4 to 6 months)
Follow Full Stack Open parts 0-7, reading Eloquent JavaScript or javascript.info whenever the course assumes something you do not know, then do parts on TypeScript and testing.
Level 1: Absolute Beginner
| Book | Author(s) | Best for | License / access |
|---|---|---|---|
| Eloquent JavaScript, 4th ed. (2024) | Marijn Haverbeke | Learning to program, not just learning syntax. Includes projects (a robot, a programming language, a pixel art editor, a platform game). PDF, EPUB and MOBI also free. | CC BY-NC (code MIT) |
| The Modern JavaScript Tutorial | Ilya Kantor and contributors | Systematic, current, with tasks after each article. Many translations. | Free online (CC BY-NC-SA) |
| The JavaScript Way | Baptiste Pesquet | Gentle beginner book that ends with front-end and Node projects. | CC BY-NC-SA 4.0 |
| Learn JavaScript: Beginner’s Edition | Suman Kunwar | Short open-source intro with exercises; good second explanation of basics. | Free online |
| JavaScript (Learn X in Y minutes) | Community | A one-page syntax tour for programmers. | CC BY-SA 3.0 |
| MDN: Learn web development | Mozilla and contributors | HTML, CSS and JavaScript together as a structured curriculum. | CC BY-SA 2.5 (prose) |
| web.dev: Learn JavaScript | Google Chrome team | Short modern course on the language. | Free (CC BY 4.0 content) |
Best pick: Eloquent JavaScript if you want to become a programmer; javascript.info if you want a JavaScript reference you can read in order. Many people read Eloquent first and use javascript.info as a companion.
Level 2: Core JavaScript in Depth
| Book | Author(s) | Best for | License / access |
|---|---|---|---|
| You Don’t Know JS Yet, 2nd ed. | Kyle Simpson | Get Started and Scope & Closures are finished; Objects & Classes is a stable draft; Types & Grammar a rough draft. The series is marked complete and closed to contributions. | CC BY-NC-ND 4.0 |
| You Don’t Know JS, 1st ed. | Kyle Simpson | The original six books, including Async & Performance and ES6 & Beyond. Older but still valuable on async. | CC BY-NC-ND |
| JavaScript Allongé, the “Six” edition | Reginald Braithwaite | Functions, closures and composition, written for programmers. Free to read on Leanpub. | Free online |
| Understanding ECMAScript 6 | Nicholas C. Zakas | What ES2015 changed and why: block bindings, classes, promises, modules, proxies. | Free online |
| Practical Modern JavaScript | Nicolás Bevacqua | Modern syntax and features with practical context. | Free (GitHub) |
| JavaScript Primer (Japanese) | azu, Suguru Inatomi | A thorough, maintained ECMAScript book for Japanese readers. | Free online |
| 33 JS Concepts | Community | A checklist of concepts with curated articles; use to find gaps. | Free (GitHub) |
| What the f*ck JavaScript? | Denys Dovhan and contributors | Surprising language behavior, explained with the spec. Fun and instructive. | WTFPL |
Level 3: Functional Programming in JavaScript
| Book | Author(s) | Best for | License / access |
|---|---|---|---|
| Mostly Adequate Guide to Functional Programming | Brian Lonsdorf (“Professor Frisby”) and contributors | Pure functions, currying, composition, functors, monads, applicatives. (repo) | CC BY-SA 4.0 |
| Functional-Light JavaScript | Kyle Simpson | Pragmatic FP without heavy theory; a good first FP book. | CC BY-NC-ND 4.0 |
| JavaScript Allongé | Reginald Braithwaite | Combinators and decorators built from first principles. | Free online |
Best pick: Functional-Light JavaScript first, then Mostly Adequate Guide if you want the algebraic side.
Level 4: Patterns, Architecture and Clean Code
| Resource | Author(s) | Best for | License / access |
|---|---|---|---|
| Learning JavaScript Design Patterns | Addy Osmani | Classic patterns (module, observer, mediator, etc.) applied to JS. The page may redirect to the author’s newer edition site. | Free online |
| Patterns.dev | Lydia Hallie, Addy Osmani | Modern design, rendering and performance patterns for React and Vue apps. | Free online |
| Mastering Modular JavaScript | Nicolás Bevacqua | Module design, interfaces, state and how to keep large codebases understandable. | Free (GitHub) |
| Clean Code JavaScript | Ryan McDermott | Clean Code principles adapted to JavaScript, with bad/good examples. | MIT |
| Human JavaScript | Henrik Joreteg | Structuring single-page apps for humans (older, framework-agnostic lessons). | Free online |
| Airbnb JavaScript Style Guide | Airbnb | A widely copied style guide with reasons for each rule. | MIT |
TypeScript Books and Guides
| Resource | Author(s) | Best for | License / access |
|---|---|---|---|
| The TypeScript Handbook | TypeScript team (Microsoft) | The official book. Start with TypeScript in 5 minutes, then Everyday Types onward. | Free (official) |
| Total TypeScript Essentials | Matt Pocock | Modern TypeScript from setup to advanced patterns; full chapters readable on the site at review time (paid workshops are upsold alongside). | Free online |
| TypeScript Deep Dive | Basarat Ali Syed | Project setup, type system details, tips and StyleGuide. Some sections predate newer features. | Free online |
| Declaration Files guide | TypeScript team | Writing .d.ts files for libraries. |
Free (official) |
| Google TypeScript Style Guide | Concrete rules used across a very large codebase. | CC BY 3.0 | |
| React TypeScript Cheatsheets | Community | Typing props, hooks, context and components. | MIT |
| Beginner’s TypeScript tutorial | Total TypeScript | Hands-on exercises with tests. | Free (GitHub) |
| type-challenges | Community | Type-level puzzles from easy to extreme. | MIT |
| TypeScript Exercises | Community | Browser-based progressive exercises. | Free |
| TypeScript Performance wiki | TypeScript team | Making large projects compile faster. | Free |
Best pick: Handbook first (it is short), then Total TypeScript Essentials. Use type-challenges only once generics feel natural.
Node.js and Server-Side JavaScript
| Resource | Best for | Access |
|---|---|---|
| Node.js Learn | Official guide: modules, async, file system, HTTP, TypeScript support, testing. | Free (official) |
| Node.js API documentation | The reference for built-in modules. | Free (official) |
| Node.js Best Practices | 100-plus best practices on structure, errors, security, testing, production. | CC BY-SA 4.0 |
| Practical Node.js (source) | Express, MongoDB, REST APIs, deployment; older, but the source of the book is public. | Free (GitHub) |
| learnyounode and NodeSchool | Terminal-based interactive workshops. | Free |
| Deno documentation and Bun documentation | Alternative runtimes with built-in TypeScript, test runner and tooling. | Free (official) |
The Browser, the DOM and Web Performance
| Book | Author(s) | Best for | Access |
|---|---|---|---|
| javascript.info Part 2: Browser | Ilya Kantor | DOM, events, forms, network requests, storage. | Free online |
| DOM Enlightenment | Cody Lindley | How the DOM really works, without jQuery. Older but clear. | Free online |
| High Performance Browser Networking | Ilya Grigorik | TCP, TLS, HTTP/2, WebSocket, WebRTC: why the web is fast or slow. | Free online |
| web.dev Learn | Google Chrome team | Courses on performance, accessibility, CSS, forms, PWAs. | Free |
Frameworks: Official Guides That Read Like Books
| Guide | Notes |
|---|---|
| React: Learn | The official React docs, rewritten around hooks, with interactive challenges. |
| Vue.js Guide | Clear, complete, and approachable. |
| Svelte tutorial | Interactive, in-browser. |
| Angular tutorials | Official, modern Angular (signals, standalone components). |
| Next.js Learn | Builds a full dashboard app step by step. |
| Vitest guide and Testing Library | Testing JavaScript and UI components. |
The Specification and References
- ECMAScript Language Specification - the living spec. Hard reading, but the final word.
- TC39 proposals - what is coming to the language and at which stage.
- MDN JavaScript Guide - the practical reference everyone uses.
- TypeScript documentation and TypeScript blog - release notes explain new features with examples.
Free Courses and Practice
| Resource | Notes |
|---|---|
| Full Stack Open | University of Helsinki course text, free, with exercises and optional credits. |
| The Odin Project | Free project-based curriculum with full-stack JavaScript path. |
| freeCodeCamp | Free interactive curriculum and certifications. |
| JavaScript30 | 30 small vanilla JS projects in 30 days, free videos. |
| Exercism JavaScript / TypeScript | Practice exercises with optional mentoring. |
| learn-js.org | Interactive basics in the browser. |
Excellent Paid Books (Clearly Marked)
| Book | Why recommended | Status |
|---|---|---|
| JavaScript: The Definitive Guide, 7th ed. (David Flanagan, O’Reilly) | Comprehensive reference to the language and platform. | Paid |
| Effective TypeScript (Dan Vanderkam) | Specific items on using the type system well. Site has a free blog. | Paid |
| Eloquent JavaScript in print (No Starch Press) | Same book as the free edition, in paper. | Paid (online is free) |
Changes and Removals Worth Knowing
- Exploring JS books (JavaScript for Impatient Programmers, Deep JavaScript, Tackling TypeScript and others) were long free to read online. At this review the author’s site said the free online editions and blog are being taken offline for now, with books available to buy. We list them here only so you are not confused by old links; they are not currently free.
- JavaScript Garden - the old GitHub Pages site now returns 404.
- JavaScript for Cats - the domain no longer hosts the book. Do not visit old links to it.
- Speaking JavaScript - the old domain did not respond at review time.
Comparison: Which First JavaScript Book
| Eloquent JavaScript | javascript.info | You Don’t Know JS Yet | MDN Guide | The JavaScript Way | |
|---|---|---|---|---|---|
| Level | Beginner to intermediate | Beginner to advanced | Intermediate | Beginner (programmers) | Beginner |
| Style | Book with projects | Tutorial articles plus tasks | Deep conceptual essays | Reference guide | Gentle book |
| Covers the browser | Yes | Yes, extensively | No | Separate docs | Yes |
| Exercises | Yes, with sandbox | Yes, with solutions | Few | Few | Yes |
| Offline formats | PDF, EPUB, MOBI | Paid EPUB/PDF | Markdown on GitHub | No | GitHub source |
Practice Projects to Do Alongside the Books
Beginner
- Tip calculator with input validation (DOM practice).
- To-do list with
localStoragepersistence. - Quiz app loading questions from a JSON file.
- Countdown timer and stopwatch.
- A Node script that renames files in a folder by date.
Intermediate
- Weather dashboard using a public API with loading and error states.
- Markdown previewer.
- A promise-based retry-with-backoff utility with tests.
- A small Express or Fastify REST API with input validation and tests.
- Convert one of the above to TypeScript with
strict: true.
Advanced
- A tiny reactive state library (observable store with subscriptions).
- Implement
Promise.all,debounce,throttleanddeepEqualfrom scratch with tests. - A minimal virtual DOM renderer.
- A CLI tool published to npm with types.
- A type-safe API client generated from a schema.
FAQ
What is the best free JavaScript book for beginners? Eloquent JavaScript (free online, PDF and EPUB) or The Modern JavaScript Tutorial at javascript.info. Eloquent teaches programming; javascript.info teaches JavaScript thoroughly.
Is Eloquent JavaScript free? Yes. The 4th edition (2024) is free online under a Creative Commons non-commercial license, with code under MIT. A paper edition is sold by No Starch Press.
Is You Don’t Know JS free? Yes, the full text of both editions is on GitHub under CC BY-NC-ND. The 2nd edition series is marked complete; some volumes remain drafts and two were canceled.
Should I learn JavaScript or TypeScript first? JavaScript first. TypeScript is JavaScript with types, so you need to understand the runtime behavior. Start TypeScript once functions, objects, arrays and async are comfortable, usually after 1-3 months.
Where can I learn TypeScript for free? The official Handbook, Total TypeScript Essentials and TypeScript Deep Dive, then practice with type-challenges.
Are the Exploring JS books still free? Not at the time of this review; the author announced the free online versions were being taken offline. Check the author’s site for the current status.
How long does it take to learn JavaScript? Basics take 6-10 weeks part time. Being job-ready for front-end work (JS, a framework, Git, testing, HTTP) usually takes 6-12 months.
Do I need to learn jQuery? No. Modern browsers cover what jQuery was used for. Learn the DOM directly.
Where to Go Next
- Python: free-programming-books-python
- Systems languages: free-programming-books-go-rust, free-programming-books-cpp
- JVM: free-programming-books-java
- Bigger indexes: free-programming-books, JSBooks, awesome-javascript, awesome-typescript, awesome-nodejs
Contributing
To suggest a book, open an issue or pull request with the official URL (no mirrors), the license or access terms, edition, and one sentence on who it is best for. Dead links and books that stopped being free are removed; please report them.
License
This list is released under CC BY 4.0. The books belong to their authors and publishers under their own terms.
If this helped you, a star helps others find it.
More free resources
Part of the Ralpberry Labs open-source collection. See also Top 100 Open Source.