How To Hide / Protect JavaScript Code | Javascript Security

preview_player
Показать описание
JavaScript Question: How do I Hide JavaScript Code? Hide javascript code from view source. Sometimes you want to protect your JavaScript code from stealers or attackers. Sometimes you want to showcase an app but you want the user to not copy the code for obvious reasons. I got a tutorial request to show that how can we easily protect JavaScript code. So here it is.

One method is to minify your code. Keep the source and share minified version of code.
There are many online tools available to minify the code. Your favorite code editor can also minify code for you. We have minification tutorial for this. So go check it out.

But sometimes you have to share the actual code. In that case, you can use any JavaScript obfuscator tool. There are many such tools available online that give you option to even customize your output and level of complexity. It won't protect your code 100%. But it will give your code enough protection to give stealer hard time to figure it out. You can use parts of your code to make it not-so-easily readable, or implement this method for whole document. keep the source to yourself and share the processed code.

Which methods do you use to protect or hide your JavaScript code?

Full Playlists:
JavaScript Problem Solving:

Web Development Essentials:

Crash Courses:

How to Hide CSS Code

Give this video a LIKE
SUBSCRIBE to Channel if you haven't already
Hit BELL icon to receive updates
Share your thoughts in comments
Share our videos on social media platforms
Give us feedback
Follow us on social media

Tell us what should we cover for you.
Ask programming, web development, software engineering, frameworks related questions.
Thanks for watching!
Stay tuned!

#WebStylePress #JavaScript #Security #CodeSecurity #JS #code #WebDevelopment
Рекомендации по теме
Комментарии
Автор

To watch more related videos, please LIKE, SHARE & SUBSCRIBE! WebStylePress needs your support.

webstylepress
Автор

Love u dude so much. Thanks a lot for this information

guidingtechbd
Автор

Thanks for the tutorial. Second method is very useful!

ivanoffeditz
Автор

The second technical is good. The best way is to replace readable text with symbols, random words, wierd spaces etc. No one would want to use such code, they will only try to do it by themselves.

TON-vzpe
Автор

This tutorial are so helpful thank you sir

dumdcode
Автор

Thanks, This Video is Very Helpful For Me

muhammadqadamacs
Автор

I used this
but sometimes when I click on button it won't work, but in the original file there is no problem it works !
can you help me please

peshangahmad
Автор

thank you so much been seqrching for a vifeo like this

codedynamics
Автор

can you use both minify and obfuscate?

hkhk
Автор

Thank you sir...
Will both options work for brython?
Brython (Python) -> replacement of JS

santhosh
Автор

thank you sir, good video; i now this is not bulletproof but it will make things harder for bad intentioned people

emanuelb.
Автор

But under developer tools when you inspect the minified file you have an option to reformat the code back in readable format!

rajputmanish
Автор

Can't I just take the minified code and use the Pretty package to format the code back to great formatted code for me?

jimpeterson
Автор

Obfuscation can work... But the first one is foolish... Chrome can "pretty print" Minified file

CyroCoders
Автор

Cant the obfuscated code be translated to normal code with a tool or so??

purbo
Автор

Nice video
But which theme and editor you are using tell me

sameerbalyan
Автор

Lot of business leads end up with reactjs just because they want to conceal their business logic in their frontend javascript. And thats like a completely separate language, way of thinking etc needing lot more technical skills. They end up not being able to maintain the application after the initial developer leaves.
They could just implement using basic javascript and use these obfuscators instead.

nikjs
Автор

my file is 16kb, and it won't let be obfuscated. what do i do?

itimdesigner
Автор

If someone use my minfied code then? Steller are smart now.. so make some sanse and make a new video. Thanks btw this is much useful.

vikassahu
Автор

if anyone copy your all code not a particular one how can you protect

koushikbag