So you want to learn to code, but don’t have the time, money, or patience to register for a formal course?
There are tons of free resources online where you can learn to code on your own schedule, at your own pace, and with the kind of content that matches your learning style.
Below, you’ll find 20 of the best free resources to teach you how to code. You’ll find a good mix of content here, from written and video tutorials to coding playgrounds that reinforce all the new skills you’ve picked up.
20 Places Where You Can Learn to Code for Free
There are online resources for every level of a coder, whether you’re:
- A self-starting business owner or freelancer who wants to build their own website.
- A seasoned web developer that wants to add a new skill or programming language to their repertoire.
- A web designer who wants to strengthen their understanding of code and become a design/development powerhouse.
- A hobbyist who wants to learn how to code in their spare time.
- A computer science student who wants to supplement their course work with hands-on coding tutorials.
It doesn’t matter who you are or what your goal is in learning to code with free resources. There’s something for everyone.
1. BitDegree (Beginner to Advanced)
If you’re looking for more than just step-by-step tutorials, BitDegree is a good pick.
With BitDegree, users will certainly learn how to code — from fundamentals like HTML and CSS to advanced programming languages like Bootstrap and Python.
While you work your way through the lessons, you’ll be encouraged to “Try It Live” in the BitDegree editor:
What’s nice about this is you won’t just get to practice with the language you’re learning about. All of the other language building blocks will be there, like in the above CSS example that includes both HTML and CSS.
In addition to coding lessons, users get an introduction to the key tools web developers use, like Chrome DevTools and Github.
If you’re looking for a well-rounded education, it’s important to learn how to use the tools that make your life easier as a developer.
2. CSS-Tricks (Advanced)
When you first step inside the CSS-Tricks website, you’ll be greeted by its blog. While there’s a lot that can be learned from the articles about coding (in particular, CSS), most of these are lessons for advanced developers.
That said, CSS-Tricks does have a dedicated section of beginner guides. There are less than 20 CSS tutorials here, but running through them will give any user a solid foundation for CSS (and some HTML).
For users that want more than intro tutorials, look to the Snippets page.
Code snippets are useful for a number of reasons. For starters, they help developers quickly implement new features or fixes without having to write the code on their own.
Secondly, code snippets are useful for getting to know the syntax of a language better. As you use more and more code snippets, you’ll get to know the patterns of the language and, as a result, grow more comfortable manipulating it.
3. Derek Banas on YouTube (Intermediate to Advanced)
Derek Banas’s YouTube page is a must-visit if you’re interested in learning advanced web development and design techniques.
For the most part, it’s Derek’s coding tutorials that are the most popular, though it’s definitely worth taking a look around at the various video collections he’s created over the years.
Each of the tutorials is well-organized and will cover a topic in full, usually in less than an hour. It’s a really great option for anyone who learns best by observing someone doing the skill in real-time.
Another thing worth noting is that Derek creates two new tutorials every week. What’s more, he invites viewers/subscribers to make requests, so if there’s something urgent you need to learn and can’t find it elsewhere, you may be able to get it here.
4. freeCodeCamp (Beginner to Intermediate)
freeCodeCamp is a solid resource for novice or intermediate web developers who want to level up their skills quickly and get rewarded for it.
Once you create an account, freeCodeCamp will help you get started on your training:
Not only that, but lessons are also logically grouped together so you can incrementally add to your coding knowledge. In the end, you’ll end up with a certification as well as a larger portfolio you can show off to prospective clients.
Although this website is branded as an educational resource for developers, there’s nothing to stop other coding enthusiasts from signing up. There’s no fee to join and the lessons aren’t written in some secret developer speak.
So, if you like the style of the site and how the lessons are presented (along with estimates of how long all of them take!), give it a shot.
You’ll also gain access to the forums where you can share your wins, ask questions, and help other students work their way through the lessons. That’s a nice bonus if you prefer a collaborative learning environment.
5. Glitch (Beginner to Advanced)
Think of Glitch as a coding playground. That said, it’s not just a place to write lines of experimental code, though it does give you space to do that along with some pointers on how to get started.
Users can leverage pre-made web apps — from Glitch or tools like Github — to unlock the basics and teach themselves new skills by reverse-engineering existing code.
Here’s an example of what happens when a user chooses to “Remix” an app someone else created:
Users gain access to all of the files and assets that, when put together, create the resulting web app. As changes are made to the content of the files using the editor, the preview reflects those changes.
Also, be on the lookout for Glitch’s “starter” templates, like this one:
6. Google Developers (Intermediate to Advanced)
Google Developers is a free resource for anyone who wants to learn how to code better web experiences.
With Google hyper-focused on building a mobile-first web, this site is best for developers who want to learn how to code progressive web apps (PWAs).
If you go to the Code Labs tab, look for the tutorial called “Your First Progressive Web App”.
This is a comprehensive, yet easy-to-follow tutorial that teaches users what a PWA is as well as how to build one in less than 30 minutes.
As for using the rest of the site as a coding resource, you can certainly use it if you need to make improvements to the responsiveness, speed, or even security of your website or web app.
7. HTML Dog (Beginner)
There are nine total tutorials available on the site, ranging from beginner to advanced, in each of the coding languages.
Each lesson carefully spells out everything you need to know about each of the languages. And with clear code examples included along the way — as well as tips on how to reproduce them on your end — this is a great way to get the hang of coding if you’re new to it.
However, HTML Dog isn’t just a resource for beginner coding tutorials.
The Techniques page, for example, teaches users how to do more to style a web page than basic tutorials allow for.
The Examples page, on the other hand, provides code snippet examples for all of the essential elements you’d manipulate on a website:
- And more
The References page is also useful if you want to understand the actual syntax of the coding languages you’re using. The more you understand how the various values contribute to what appears on the frontend, the stronger a coder you’ll become.
Pluralsight is a premium e-learning website for advanced coders.
The second a user steps inside the website, the learning begins:
Once users get through the courses, there’s a handy reference guide on the Learn page.
9. Khan Academy (Beginner)
Khan Academy is a free online educational resource for users of all ages.
Most of the classes offered by the academy are for grade school students. However, there is a small section devoted to “Computing” which is where you should turn your attention to:
There are a number of sections under Computing, but the one you should pay attention to is Computer Programming.
- Video lessons (which come with transcripts as well as multilingual closed captions)
- Quick tips
- Coding challenges
They’re easy to work through as well as super engaging.
10. Learn to Code HTML & CSS (Beginner to Intermediate)
Each lesson is carefully laid out and does more than just present users with code snippets.
Everything is explained in full, from what each language is used for to how every component of the language works. There are two lesson trajectories, too.
Once you finish the introduction to HTML & CSS, you can move on to the advanced lessons.
It’s here you’ll learn coding strategies that not only add advanced functionality to your website but also generally produce better quality code. With a huge emphasis placed on things like fast-loading pages and mobile responsive design, the advanced course will be really useful.
At the bottom of each course, you’ll find a list of recommended resources. It’s worth taking time exploring these other resources if you want to learn as much as you can on each topic.
11. LearnCode.academy on YouTube (Beginner to Advanced)
The LearnCode.academy YouTube page is more than just a training resource as you learn to code.
LearnCode.academy has a really good mix of content.
There are video roundups on the must-have tools for web developers. There are web design tutorials. And there are, of course, tutorials that center around mastering new programming languages.
One thing to keep in mind with this resource is that it should really only serve as a supplement to other kinds of training you’re doing.
The content here is top-notch. However, new tutorials aren’t produced on a regular basis, so you’ll spend most of your time working your way through an older backlog which may put you at risk for learning older coding techniques if you go too far back.
12. Learn[Language].org by DataCamp (Beginner to Advanced)
DataCamp is an e-learning website that specializes in data science courses (basically, learning how to extract and manipulate information from big data).
Its series of “Learn” websites, however, are free resources for anyone who wants to learn how to code. They cover a wide gamut of languages for beginners to advanced coders like:
Each language has a dedicated series of tutorials that come with it.
What’s neat about this website is that it not only provides a breakdown of each language with sample code, but it provides a space at the bottom for users to work:
By clicking “Start Exercise”, instructions are provided on how to manipulate the existing code and create a valid output. If you want to practice what you’re learning in real-time without having to exit the site, this is a good option.
13. MarkSheet (Beginner)
MarkSheet is a free HTML and CSS course for beginners.
In addition to teaching the basics of coding, the course also goes over important information you need to know before building anything on the web.
For example, the Introduction covers topics related to the web as a whole. Like the three parts of a domain name, how a website appears on other people’s browsers, and common text editors you can use to write and edit code.
Learning to code a website is one thing, but understanding how everything works behind the scenes will take your education to a whole different level.
When taking this course, either carve out enough time (at least an hour) to work your way through it one sitting or break it up between the three chapters:
Sass isn’t actually a language like the other two. In that chapter, users learn how the preprocessor (as well as Less) saves time in coding CSS from scratch.
Although there are no exercises on this website, the code examples are pretty robust and will give you a lot to play with in the code editor of your choice.
14. Mozilla Developer (Beginner to Intermediate)
There is a lot to learn from the Mozilla Developer website. Starting out, though, focus your attention on running through the various web technologies tutorials:
While you won’t have a place to experiment with the code snippets provided, Mozilla has shared all of their samples over on GitHub and provided details on how to access and use them.
So, before you work through any of the lessons on the site, make sure you’re set up with Github so you can practice as you go along.
If you’re a web developer or trying to start your career as a developer, there are additional resources to use on this site.
For one, don’t stop your education at mastering the languages. Mozilla also provides lessons on things like:
- Web accessibility
- Server-side scripting languages
- Browser testing
There’s also a dedicated section for progressive web apps. You’ll not only get a solid introduction to PWAs, but you’ll get code snippets to help you build your own.
15. The Net Ninja on YouTube (Beginner to Advanced)
The Net Ninja YouTube page is dedicated to breaking down the most complex concepts of coding in easy-to-follow video tutorials.
What’s nice about the structure and organization of the tutorials is that many of them are geared at beginners — be it a coding beginner altogether or a newbie developer.
The aim is always the same though: help viewers/subscribers quickly ramp up their coding skills so they can do something significant with them.
The tutorials and playlists you’ll find on this channel are actually very similar to many of the written resources on this list.
Not only do you get a lesson on how to use code or master a new language, but you get an introduction at the start that explains why it all matters.
16. The Odin Project (Beginner)
The Odin Project is an open-source project aimed at equipping web developers with the skills needed to build high-quality websites.
With each lesson, you’ll receive:
- An introduction to why the lesson is important.
- A summary of the learning outcomes.
- An assignment with links to the lesson.
- Additional resources to further advance your skills and understanding in the area.
What you may notice as you go through the lessons is that some of them overlap with other resources on this list. For instance, the HTML Basics lesson will send you to the Learn to Code HTML & CSS website.
It’s not just lessons on coding users get either. There’s a lesson called “Getting Hired”:
For new developers, it can be difficult getting clients. By completing these courses, however, developers will have the opportunity to build brand new websites and publish them to Github as sample work. Then, by completing this Getting Hired course, they’ll get tips on how to make themselves hireable going forward.
17. SitePoint (Intermediate to Advanced)
The SitePoint website is a mix of premium web design and development ebooks and free blog content on targeted topics.
To be clear, SitePoint isn’t really a website for beginner coders. You will find “intro to” posts if you search for them, but that’s not really where this site shines.
SitePoint is a good resource for coders who are ready to move beyond the basic “write this line of code to get this result”. Here you’ll learn how to be creative with the coding knowledge you already have.
In addition, the blog is full of useful roundups:
18. SoloLearn (Beginner to Advanced)
SoloLearn is the only mobile (and web app) on this list, so if you’re looking for something you can use to learn on the go, this is it.
With SoloLearn, users learn how to code with HTML and CSS as well as advanced programming languages.
This is what you’ll see when you enter the SoloLearn app (on desktop):
It’s a well-structured program that starts with the basic syntax and works through the various components of the language. In the end, you’ll receive a certificate of completion.
Some parts of the courses are structured as quizzes. In order to move on, you must answer each question correctly.
Other parts of the course are structured as basic tutorials with code snippets:
If you prefer to learn, test, and receive validation as you go along, the course/quiz/playground combination here is a potent one.
19. W3Schools (Beginner to Advanced)
W3Schools has dubbed itself “The World’s Largest Web Developer Site” and it’s actually a fairly accurate description.
Whether this if your first time seeing code or you’re a seasoned coder, there’s something for everyone here.
Any coding language you might be interested in learning is accounted for here. You can even take tutorials on how to code website components like icons, graphics, colors, and more.
Although users receive a quick summary of what each language is for, the main focus is on starting the hands-on lesson.
So, before you start working your way through any of the tutorials on this site, make sure you know which languages you need to focus on. You don’t want to start learning something like React if you’re trying to master the basics, for instance.
Whatever languages you do work your way through, be sure to use both the References and Exercises at the same time.
These are meant to be companion reference material that strengthens your lessons. Definitely take advantage of them if you want to get the most out of this site.
20. websitesetup.org (Beginner to Advanced)
websitesetup.org is chock full of useful educational resources for anyone trying to learn to code for free.
While many of the guides on WebsiteSetup show you how to build and customize websites with WordPress — bypassing the need to code from-scratch — that’s not all there is here.
For instance, there’s a growing set of website development tutorials, guides, and cheatsheets available:
What’s great about these guides is that they not only provide users with coding fundamentals, but there’s often a strong tie-in to WordPress, too. That way, you don’t have to pick one or the other: code or WordPress. You can get the most out of building a website by learning best practices for both.
Another thing you’ll get from WebsiteSetup that you won’t find in traditional coding courses is how to use code to debug and fix your website. Like this example of how to troubleshoot errors in WordPress.
This way, you’ll get a more well-rounded education on how to code, from using it to build a website to later enhancing or repairing it.
As you can see, the resources above provide so many different ways to learn and strengthen your coding skills:
- Written tutorials
- Video courses
- Code snippets
- Coding playgrounds
- Tool roundups and development strategies
- And more
That’s not the only benefit of choosing one of these free resources to learn to code or improve your existing set of skills.
Whether you’re a true-blue beginner or you’ve been coding for years, you have complete control over your education. You can learn to code on your own schedule, at your own pace, and for nothing more than the cost of the time you put into it.