Most web developers write at least some code from scratch, but very few write entire websites from scratch, and almost none do so without relying on layers of existing software. The realistic answer is that professional web development is usually a mix: developers write original code for the parts that are specific to a project, and they build on frameworks, libraries, templates, and tools for everything else. "From scratch" is not a binary state but a spectrum, and where a given developer sits on that spectrum depends on the job, the type of site, the team's preferences, and the deadline.
The confusion behind the question is understandable. People learning to code often spend weeks writing every line by hand in tutorials, then encounter professional codebases that look nothing like that experience—full of imports, framework conventions, generated files, and configuration. Meanwhile, marketing language around "no-code" and "AI-generated" tools suggests that human coding is disappearing. Neither picture is accurate.
What "From Scratch" Actually Means in Web Development
Before deciding whether developers write from scratch, it helps to separate what scratch could mean.
At one extreme, "from scratch" means writing pure HTML, CSS, and JavaScript in plain text files with no frameworks, no libraries, no build tools, and no starter templates—then uploading those files to a server. A developer can still work this way today, and some deliberately do for small sites, teaching, or maximum simplicity.
One step over, "from scratch" might mean writing the application logic yourself but using a framework such as React, Vue, Django, Rails, Laravel, or Next.js. The developer writes the pages, components, data handling, and business rules, but the framework supplies routing, state management plumbing, security conventions, and rendering.
At the far end, "from scratch" collapses into "without writing much code at all": assembling a site from a content management system with prebuilt themes, a site builder like WordPress with page-builder plugins, or a hosted platform with drag-and-drop tools and a few custom snippets.
All three are legitimate forms of web development, and the same developer might work in all three modes within a single year. So the honest answer to "do web developers write code from scratch?" is: they routinely write substantial original code, but they almost never write the whole stack themselves, because doing so would be slow, risky, and unnecessary.
Why Developers Rarely Build Everything Themselves
The web is built on shared foundations. When a developer writes a line of code that sends data from a form to a server, that request travels over the HTTP protocol, is parsed by a web server, and lands in a programming language runtime—none of which the developer wrote. When they style a button, the browser's CSS engine interprets it. When they log a user in, they likely rely on a cryptographic library rather than implementing encryption.
This is not a shortcut; it is the normal state of software engineering. Every layer below the application is code someone else wrote and maintains: the operating system, the database engine, the server software, the language standard library, and the browser. Writing "everything from scratch" would mean re-implementing decades of standardized infrastructure and would almost certainly produce something slower, less secure, and less compatible than what already exists.
The practical question for a developer is therefore not "do I write from scratch?" but "which parts should I write myself, and which parts should I reuse?" That decision is the heart of the craft.
What Developers Write Themselves
Even with heavy reuse, professional developers write a great deal of original code. On a typical project, that includes:
Application-specific logic. The rules that make a business unique—how a shopping cart calculates discounts, how a booking system resolves scheduling conflicts, how a content platform recommends articles—are almost always written by hand. No framework ships with your company's pricing rules.
Components and interfaces. A developer writes the buttons, forms, navigation, modals, tables, and page layouts that make up the user interface, even when they use a component library as a starting point. Customizing and composing those pieces is original work.
Data models and integrations. Connecting an app to a payment processor, an email service, a CRM, or a third-party API typically means writing glue code: transforming data, handling errors, retrying failed requests, and mapping between systems.
Server-side endpoints and validation. Deciding what the server accepts, checking and sanitizing inputs, enforcing permissions, and returning appropriate responses is code written for the specific application.
Tests, configuration, and deployment scripts. Much of a developer's day is spent on the code that supports the code—automated tests, build configuration, environment settings, and deployment pipelines.
Debugging and fixing. A large share of professional work is reading existing code—often written by teammates or inherited from previous teams—and changing it. Writing original code and maintaining other people's code are two sides of the same job.
So the phrase "write code from scratch" is misleading if it implies starting from an empty file for the whole project. It is accurate if it means authoring the source code for the project's unique behavior rather than clicking options in a hosted builder.
The Role of Frameworks, Libraries, and Templates
Frameworks and libraries are not cheating; they are how modern software is built. A framework like React provides a way to describe interfaces and update them efficiently. A server framework like Django or Rails provides conventions for routing, database access, and security. A CSS framework like Tailwind provides utility classes instead of hand-written styles. A package manager pulls in hundreds of small libraries, each solving a problem someone already solved well.
Templates occupy a middle ground. A developer might start a project from a starter kit or a theme, then modify it heavily. The initial structure is not written from scratch, but the finished application may contain thousands of lines of original code. This is normal and generally good practice: starting from a proven structure avoids reinventing basic architecture and lets the developer focus on the parts that matter.
There is a real trade-off, though. Every dependency is code the team did not write and must still trust, update, and understand. Overusing libraries can make a project hard to debug, bloated, and vulnerable when a dependency falls out of maintenance. Experienced developers therefore weigh whether a library is worth adding versus whether a small amount of hand-written code would be simpler and more controllable. Sometimes the answer really is to write it yourself.
The Role of Content Management Systems and Site Builders
Millions of websites are built primarily through WordPress, Shopify, Squarespace, Wix, and similar platforms. On these sites, a developer may write little or no code—they configure themes, install plugins, set up templates, and perhaps add custom CSS or a few JavaScript snippets. A freelancer or agency building a small business site this way is still doing web development, just a different kind of it.
This is not a lesser form of the job, but it is a different skill set. The work shifts from authoring application logic to selecting components, managing content structure, tuning performance, and solving problems within the platform's constraints. When a client needs something the platform cannot do, the developer writes custom code—often a plugin or theme override—to extend it.
The distinction matters because search results about "writing code from scratch" often conflate the two worlds. A WordPress developer may spend most of their time in a dashboard and still write code for custom functionality. A front-end engineer at a software company may never touch a CMS. Both are web developers, and the answer to the scratch question differs for each.
Front-End, Back-End, and Full-Stack Differences
The answer also depends on specialization.
Front-end developers write the code users interact with: HTML structure, CSS styling, and JavaScript behavior, often within a framework. They may use component libraries and design systems, but they compose and customize interfaces, handle state, and connect to APIs. Most front-end development involves substantial original code, plus a large amount of integration with existing tools.
Back-end developers write server-side logic, data models, APIs, authentication, and integrations. They work inside a language ecosystem and usually a framework, and they write the application-specific parts—database queries, business rules, background jobs—by hand. They lean heavily on databases, cloud services, and infrastructure others built.
Full-stack developers do both and are especially likely to see the mix clearly: some days writing a custom API endpoint from an empty file, other days wiring together a hosted authentication service and a payment provider with configuration and a modest amount of code.
Developers working on large established products often write less "from scratch" in the literal sense than beginners expect, because they are extending a codebase that already has patterns in place. Developers at early-stage startups or small agencies may write more original code because there is less existing structure. Neither situation is more legitimate.
When Developers Really Do Write From Scratch
There are genuine cases where writing from scratch is the right call.
Learning and prototyping. Beginners write from scratch to understand fundamentals. Experienced developers sometimes write a small proof of concept without frameworks to test an idea quickly.
Performance-critical or tiny sites. A single-page marketing site, a documentation site, or an embedded widget may be better as a small hand-written HTML/CSS/JS bundle than as a full framework application.
Custom components and libraries. When a team needs a specialized date picker, a data visualization, or a domain-specific algorithm, writing it themselves—or forking an existing library—can be the best option.
Avoiding dependency risk. Some teams deliberately limit dependencies and write small utilities themselves to keep the codebase understandable and auditable.
Educational tools and demos. Teaching materials often build things from scratch to show how the pieces fit together.
In each case, "from scratch" is a deliberate choice with a reason, not a default requirement of the profession.
Common Misconceptions
Several ideas cause confusion around this question.
"Real developers don't use frameworks." This is false. Frameworks are standard in professional work, and using one well requires real skill—understanding its conventions, its lifecycle, its performance characteristics, and its pitfalls. Writing everything by hand is not a mark of seniority.
"Using templates means you're not a real developer." Templates are starting points. The judgment lies in knowing when to use one, when to customize it, and when to build something bespoke. A developer who can choose correctly is more valuable than one who reflexively avoids templates.
"AI tools mean developers no longer write code." AI coding assistants can generate snippets, suggest completions, and scaffold projects, but they still require a developer to direct them, review their output, integrate the results, and fix what breaks. The tools change the texture of the work—more reviewing and editing, less typing—without removing the need for original code and technical judgment.
"From scratch means never copying code." Developers constantly read documentation, adapt examples, and reuse their own past solutions. Writing from scratch refers to the project's original composition, not to a ban on learning from existing code.
What This Means for Someone Learning or Hiring
If you are learning web development, expect a progression. You will start by writing small projects from scratch to learn fundamentals—HTML structure, CSS layout, JavaScript logic, how a server responds to a request. As you advance, you will adopt frameworks and tools, and you may feel at first that you are "not really coding" because so much is provided. That feeling passes. The skill is in knowing what to write, what to configure, what to reuse, and how to debug the whole system.
If you are hiring or commissioning work, ask about the stack and the approach rather than whether the developer "writes from scratch." A good answer explains which parts will be custom, which will use existing tools, what the maintenance implications are, and why those choices fit the project. A developer who insists on writing everything by hand may be ignoring practical constraints; one who only assembles plugins may struggle when custom logic is needed. The right mix depends on the requirements.
The Bottom Line
Web developers do write code from scratch—often a lot of it—but they write it within layers of existing software, and they rarely build an entire website from an empty folder with no external dependencies. The parts they author are the parts that make a project unique: the application logic, the interfaces, the integrations, and the glue that connects services. The parts they reuse are the foundations that make modern development possible: languages, browsers, frameworks, databases, and platforms. Understanding that division is more useful than asking whether the work counts as "from scratch," because in practice the answer is almost always: some of it is, and some of it deliberately isn't.