Blog

How to Learn to Code: Best Free and Paid Resources and a Plan

To learn to code, pick one language, follow one structured course, write code every day, and build small projects as early as you can. For most beginners that course is freeCodeCamp or The Odin Project (web development), or Harvard’s CS50 (computer science fundamentals). All three are free. This guide lists the resources worth your time, says what is free and what is not (as of October 2026), and ends with a 90-day plan you can follow.

Step 1: Choose a direction and one language

“Learning to code” is not one thing, and your first language depends on what you want to build:

  • Websites and web apps: HTML, CSS and JavaScript.
  • Data, scripting, automation, or coding interviews: Python is a common first language.
  • Not sure: pick Python or JavaScript. Both have plenty of free material, and variables, loops, functions and debugging carry over to every other language.

Do not collect five courses in five languages. Finish one.

Free courses that give you a path

A structured course tells you what to learn next, which is the hardest part for a beginner.

freeCodeCamp

A US nonprofit that offers courses, projects and certifications at no cost, with exercises you do in the browser. Its certifications cover web design, JavaScript, Python and databases, and each one is roughly 300 hours at your own pace. It is not a bootcamp and has no personal instructor, so you rely on its forum when you are stuck. Good for: web development from zero. Cost: free.

The Odin Project

An open source, volunteer-run curriculum for becoming a full stack web developer. It sends you to articles and projects and has you set up a real development environment early, which is harder at first but closer to real work. Help comes mostly from its Discord community. Good for: people who want a project-heavy path. Cost: free.

Harvard CS50x and CS50P

CS50x is Harvard’s introduction to computer science: eleven weeks of material plus a final project, covering Scratch, C, Python, SQL, and HTML, CSS and JavaScript. It teaches how computers and algorithms work, not only syntax, and it moves fast. CS50P is its ten-week Python course. Both are free to take as open courseware; to submit problem sets for feedback you need an edX account, and certificates are a separate paid option. Good for: people who want fundamentals and can handle a steep start. Cost: free to take.

MDN Learn web development

Mozilla’s tutorials on HTML, CSS, JavaScript, accessibility and version control, with “Test your skills” quizzes and larger challenges. It aims to take you from beginner to comfortable with front-end basics, and it reads more like a textbook than a game. Good for: a second source next to a course.

Khan Academy and Kaggle Learn

Khan Academy is a nonprofit with free courses and a Computing section; check the site for the current list of programming courses. Kaggle Learn has short, free, in-browser courses on Python, pandas and machine learning, a good fit if you are heading toward data science.

Interactive platforms with free tiers

These let you type code in the browser and get feedback straight away. Free tiers change, so check each site before you plan around one.

  • Codecademy: interactive lessons in the browser. As of October 2026 its pricing page lists a free Basic plan with limited courses, while full courses, skill paths and certificates need a paid Plus or Pro plan. Prices depend on your country and billing period, so read the page itself.
  • Sololearn: describes itself as a free, mobile-first platform for learning to code. Handy for short sessions on a phone, but you still need to write real programs on a computer.
  • Exercism: a not-for-profit with thousands of exercises in dozens of languages, free, with volunteer mentors who review your code. Better once you know some basics.
  • AlgoCademy: step-by-step lessons in 11 languages (Python, JavaScript, Java, C++, C#, TypeScript, Kotlin, Scala, Go, Swift and Rust). You write a line or two at a time and each step is checked before you move on; when a test fails you see its input, the expected output and your output. There is also an AI tutor in every lesson that explains mistakes without giving the whole answer away. The course runs from your first line of code through coding interview problems to command-line programs. A free account gives you free lessons and 30 tutor messages; the full course is paid (PRO is $69.99 a month or $249.99 a year as of October 2026, lower in many countries). Try printing to the console and variables in the Python course, or open the app.

Books and documentation

  • Eloquent JavaScript by Marijn Haverbeke: the 4th edition (2024) is free to read online, and a paperback is for sale. It is dense, so read it alongside exercises.
  • Automate the Boring Stuff with Python by Al Sweigart: free to read online under a Creative Commons license (3rd edition). It teaches Python through small, useful scripts.
  • Python Crash Course by Eric Matthes (No Starch Press): a paid, project-based book.
  • The official Python tutorial at docs.python.org is free but written for people who already program, so use it after a beginner course. MDN Web Docs is the reference you will use for years for HTML, CSS and JavaScript.

Practice problems once you know the basics

After a few weeks of syntax you need to solve problems on your own. Codewars gives you small challenges called kata, ranked by difficulty, and shows other people’s solutions after you finish. HackerRank, which many companies use for hiring tests, also has practice challenges. Exercism (above) is another good source. If these feel too hard, go back to your course for a week and return later. If you are preparing for interviews, our LeetCode alternatives post compares practice sites.

Paid options: bootcamps, Coursera, edX, Udemy

You do not need to pay to start. If you want more structure later:

  • Coursera and edX host university and company courses. Some can be viewed free without a certificate or graded work, but this varies by course and changes, so check each course page.
  • Udemy courses are paid individually and quality depends on the instructor. Read reviews and preview lessons.
  • Bootcamps are intensive and expensive, and outcomes vary widely. Before paying, ask for audited placement figures, read the refund terms, and read how any financing or income-share agreement works.

Where AI tools and podcasts fit

AI assistants can explain an error or a concept. GitHub Copilot has a free plan with monthly limits (as of October 2026). But if the tool writes every line, you will not learn to debug. Try first, then ask; our post on learning to code with AI tutors goes deeper. Podcasts such as CodeNewbie, which features developers’ stories, are fine for motivation but are not a substitute for typing code.

A simple plan for the first 90 days

  1. Weeks 1 to 4: one beginner course (freeCodeCamp’s first certification, the start of The Odin Project, CS50, or a Python basics course). Code every day, even 30 minutes.
  2. Weeks 5 to 8: keep going, and after each topic write a tiny program yourself without copying: a number guessing game, a to-do list, a unit converter. For ideas, see these Python projects for beginners.
  3. Weeks 9 to 12: build one project you care about, push it to GitHub, and solve easy practice problems a few times a week.

For a realistic time estimate, see how long it takes to learn programming.

Common mistakes

  • Switching courses when it gets hard. The hard part is usually what you are supposed to learn.
  • Only watching videos. It feels like progress and teaches little. Close the video and type the code yourself.
  • Copying code you do not understand. Redo each exercise from a blank file.
  • Waiting to feel ready to build. Small, ugly projects teach more than another tutorial.
  • Learning with no feedback. Use a forum, Discord or a study partner, and read error messages before asking.

Resources that no longer work

Older lists still recommend Grasshopper (Google’s app, shut down June 15, 2023) and Kite (an AI code completer that shut down in 2022). Skip them.

A lesson in AlgoCademy: the step to write, a picture of what it does, the line written in the editor, and the check: Step 2 passed

Before you go

Start thinking like a software engineer.

Learn to code and solve interview problems, one small, checked step at a time.

Start learning free

No account needed. You write real code in your browser.