# Disable text copy

**URL:** <https://community.weweb.io/t/disable-text-copy/9506>\
**Category:** Ask us anything\
**Created:** [July 3, 2024, 8:24am UTC](https://community.weweb.io/t/disable-text-copy/9506 "2024-07-03T08:24:00Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![kavi](https://avatars.discourse-cdn.com/v4/letter/k/a88e57/32.png) [@kavi](https://community.weweb.io/u/kavi)\
**Post date:** [July 3, 2024, 8:24am UTC](https://community.weweb.io/t/disable-text-copy/9506/1 "2024-07-03T08:24:00Z")

</div>

How can i disable the user to copy the text from the frontend as well as from the developer mode of the browser?

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [July 3, 2024, 9:57am UTC](https://community.weweb.io/t/disable-text-copy/9506/2 "2024-07-03T09:57:32Z")

</div>

> [@kavi](#):
>
> from the developer mode of the browser?

anything that arrives to the browser can be inspected with the browser’s tools. there is no way to stop that.

---

<div class="post-metadata">

**Author:** ![kavi](https://avatars.discourse-cdn.com/v4/letter/k/a88e57/32.png) [@kavi](https://community.weweb.io/u/kavi)\
**Post date:** [July 3, 2024, 10:11am UTC](https://community.weweb.io/t/disable-text-copy/9506/3 "2024-07-03T10:11:53Z")

</div>

Is there any way to hide the response from developer mode or encrypt the response? Btw I am using strapi as a CMS.

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [July 3, 2024, 10:19am UTC](https://community.weweb.io/t/disable-text-copy/9506/4 "2024-07-03T10:19:12Z")

</div>

if something is displayed in the browser anybody can access it, this is how browsers work. Of course you can encrypt the data sent to the browser, but if you then decrypt it to display it (not sure if it makes sense for you to show encrypted data) it will be available to inspect.  
Again, this is how browsers work: if you see it on screen somehow it is accessible.

---

<div class="post-metadata">

**Author:** ![andrii\_r](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@andrii\_r](https://community.weweb.io/u/andrii_r)\
**Post date:** [July 4, 2024, 12:03am UTC](https://community.weweb.io/t/disable-text-copy/9506/5 "2024-07-04T00:03:13Z")

</div>

> [@dorilama](#):
>
> if you see it on screen somehow it is accessible

You’ve probably never had to copy content in a google protected document 😅  
Even the developer console won’t help

For example: [Try to copy me 🙂 - Google Docs](https://docs.google.com/document/d/1LlvotCCeKDJII5ixOvLRAgEdY3tJiy--p3i2xSgQq44/edit?usp=sharing)

---

<div class="post-metadata">

**Author:** ![Micah](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/micah/32/9102_2.png) [@Micah](https://community.weweb.io/u/Micah)\
**Post date:** [July 4, 2024, 5:34am UTC](https://community.weweb.io/t/disable-text-copy/9506/6 "2024-07-04T05:34:30Z")

</div>

You can still 100% copy stuff from a Google Doc from the dev console 😉

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/b/bb53ed46e9b935743d07b753999e97a1745f5d8c.png)

It looks like they play around with creatively embedding the content if the dev console is detected. For the copy thing though, you could do something like disable right click and and a key down even when CTRL+C is pushed to run an action that overrides copying.

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [July 4, 2024, 6:41am UTC](https://community.weweb.io/t/disable-text-copy/9506/7 "2024-07-04T06:41:44Z")

</div>

you may want to have a better look at the browser dev tools 🙃

you can annoy users by breaking default behaviour of right click and keyboard shortcuts, but it’s pointless because the data is still fully accessible.

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [July 4, 2024, 7:32am UTC](https://community.weweb.io/t/disable-text-copy/9506/8 "2024-07-04T07:32:56Z")

</div>

You’d have to go great lengths, such as using a canvas, or an image or something, but canvas would probably the hardest to crack 😃

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [July 4, 2024, 7:44am UTC](https://community.weweb.io/t/disable-text-copy/9506/9 "2024-07-04T07:44:12Z")

</div>

not really. just look at the network panel, the data will be there (a direct request to the backend or a variable in a js bundle etc).  
the only thing that you get with the canvas is a bad experience for user accessibility.

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [July 4, 2024, 7:53am UTC](https://community.weweb.io/t/disable-text-copy/9506/10 "2024-07-04T07:53:02Z")

</div>

I mean, it’s harder for normies to copy from a canvas tho.

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [July 4, 2024, 8:56am UTC](https://community.weweb.io/t/disable-text-copy/9506/11 "2024-07-04T08:56:10Z")

</div>

it’s hard for screen readers to read from a canvas too.

as for preventing copying of text there is plenty of tutorials in the internet explaining how to use dev tools so it’s safe to assume that if a non-tech person wants to copy the text they will copy the text eventually.

if you really want to make it harder for the majority of people then I suppose you need to go for a native mobile app but you still have to break all the accessibility for people using screen readers and you can still sniff network traffic and get the data (but it should be harder than using browser dev tools)

in the end is just putting a lot of effort to go against the default platform behaviour breaking a lot of important user experience without even being sure to get the expected result.

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [July 4, 2024, 9:17am UTC](https://community.weweb.io/t/disable-text-copy/9506/12 "2024-07-04T09:17:51Z")

</div>

You can always send your API requests in Binary or some other non human readable format 😃

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [July 4, 2024, 9:36am UTC](https://community.weweb.io/t/disable-text-copy/9506/13 "2024-07-04T09:36:45Z")

</div>

and you will always have some client code that decodes that to show it. in a browser you will have access to that, in a mobile app I suppose you can have access to an encrypted storage where to put some encryption key, but still the key needs to be transmitted to the app at least once 🙃
