Privacy

Cryptojacking: When Websites Mine Cryptocurrency on Your Computer

26 Nov 2026 · 6 min read

Cryptojacking happens when a website uses your computer to mine cryptocurrency without your permission. You visit a page, a hidden script starts running, and your processor works hard to solve the calculations that earn cryptocurrency for someone else. Your computer slows down, your fan gets loud, and your battery drains faster, all while the site earns money from your electricity. This guide explains how cryptojacking works, how common it is, and how to protect yourself.

To understand cryptojacking, you need to know a little about how cryptocurrency works. For many cryptocurrencies to function, complex calculations must be carried out continuously, a process called mining. Miners perform these calculations and earn cryptocurrency in return. Mining takes a great deal of computing power, which means it takes a great deal of energy, and energy costs money. Some website owners decided to pass that cost to their visitors instead, by running mining scripts in the visitor's browser.

The longer you keep the site open, the more coins the site earns using your computer's energy. In a small way, it is clever. In every other way, it is a misuse of your device. You did not agree to lend your processor, you are not paid for the electricity, and the script can damage your experience of the web by slowing everything else down.

How Cryptojacking Scripts Get Onto Websites

Sometimes a website owner installs a mining script deliberately, hoping to earn money from visitors instead of, or in addition to, advertising. More often, the site has been hacked. An attacker breaks into a website, installs the script quietly, and collects the earnings while the owner knows nothing about it. This is why cryptojacking is also a website security problem, not just a visitor problem: a hacked site can harm every person who visits it.

Cryptojacking: When Websites Mine Cryptocurrency on Your Computer

A large study of the web found that most sites running mining scripts were small and little-visited. The study crawled more than 175 million websites and found about 23,872 domains running cryptocurrency mining scripts, which is roughly one in 7,353 websites. More than nine in ten of those sites received very few visitors from search each month. That pattern fits the hacking explanation: many of these sites were probably set up and then abandoned, left without updates, and then broken into because their software had known security holes.

One script dominated the results, accounting for more than nine in ten of the sites found. The study also found that the problem was concentrated on free blogging platforms, where many abandoned blogs live. Only a small number of the affected sites were among the most popular sites on the web. High-traffic sites have more to lose: a mining script that slows down a popular site would be noticed quickly, and there were even rumours that browsers might block sites running such scripts. For a large site, the small earnings are not worth the risk.

Signs Your Computer Is Being Used for Cryptojacking

The clearest sign is performance. If your computer suddenly becomes slow, your fan runs loudly, or your laptop battery drains much faster than usual while you are on a particular website, a mining script may be the cause. The effect usually stops when you close the tab, which is a useful test: if the slowness disappears the moment you leave a site, that site was probably the problem.

Other signs are subtler. Your browser may use far more processor power than normal, which you can check in your computer's task manager. Your device may feel warm even though you are only reading a page. On a phone, the battery may drop quickly and the phone may heat up. None of these signs proves cryptojacking on its own, because many things can slow a computer down, but together, especially when tied to one website, they are a strong hint.

It is worth remembering that a mining script does not need to be installed on your computer to harm you. It runs in the browser, in the page you are visiting, and it stops when you leave. That is different from malware that infects your device permanently, and it is also why the fix is often as simple as closing the tab and not returning to the site.

How to Block Cryptojacking and Stay Safe

The simplest protection is a browser extension that blocks mining scripts. Tools designed for this purpose stop known mining scripts from running on any site you visit, and they work quietly in the background. Some ad blockers and privacy extensions block mining scripts as well, because they treat them as another form of unwanted tracking. Installing one of these tools is a quick step that protects you on every site, not just the ones you already suspect.

How to Block Cryptojacking and Stay Safe

Keep your browser updated, because updates often include protections against abusive scripts and close the holes that attackers use. Be careful about which sites you visit, especially sites that offer free downloads, free streaming, or other offers that seem too good to be true. Those sites are more likely to be poorly maintained or deliberately abusive. If a site makes your computer slow down, close it, clear your browser data, and think twice before going back.

For website owners, the lesson is about maintenance. An abandoned website is an easy target: if the content system, the theme, and the plugins are never updated, security holes pile up, and attackers can install whatever they like, including mining scripts. If you own a site you no longer use, either keep it updated, take it down, or accept that it may be hacked and used to harm your visitors. A neglected site is not harmless; it is a liability.

How Cryptojacking Affects Website Owners

For website owners, cryptojacking is a warning about maintenance. A site that is hacked to run mining scripts will lose visitors quickly, because people notice when a page slows their computer down and they do not come back. Search engines may also treat a hacked site as unsafe, which can push it out of results entirely. The earnings from mining are small for most sites, while the damage to trust and traffic is large, so no honest owner would choose to run these scripts.

If you run a site, protect it the same way you would protect it from any other attack: keep your content system, theme, and plugins updated, use a strong admin password with two-factor authentication, and check your site's files for changes you did not make. A free site audit tool can flag suspicious scripts, and your host can help you clean a hacked site. The study's finding that most affected sites were abandoned and unpatched is a reminder that the cheapest security measure is simply paying attention.

Cryptojacking is not the most common threat on the web, and the study suggests it affects only a small fraction of sites. But it is a clear example of why you should pay attention to your computer's behaviour and why website owners must maintain their sites. Your processor, your electricity, and your battery are yours. No website should be able to borrow them without asking, and with a blocker installed and a little awareness, you can make sure none does.

Zohaib FaisalZohaib Faisal is the founder and editor of EarnDesk. Based in Lahore, Pakistan, he runs the online store Haseeb Collections and works as a freelancer on Fiverr (virtual assistance, AI content writing, AI prompt engineering and digital marketing). He builds websites — Haseeb Collections, EarnDesk and a temporary-email service — writes SEO-focused content, and has hands-on AdSense experience across his sites. He has earned 15+ professional certificates from Google, IBM, Microsoft, HubSpot, Cisco, the Linux Foundation, Unity, Semrush and Harvard (CS50P), and creates the YouTube channel Clips by Zohaib. On EarnDesk he writes practical, honest guides to help beginners earn online — without hype or "get rich quick" promises. More about Zohaib.

Earning online takes time and consistent work. Results vary from person to person, and no method on this page guarantees any income. Treat every opportunity as a skill to build, not a shortcut.