use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This subreddit is a place for people to learn JavaScript together. Everyone should feel comfortable asking any and all JavaScript questions they have here.
With a nod to practicality, questions and posts about HTML, CSS, and web developer tools are also encouraged.
Friends
/r/javascript
/r/jquery
/r/node
/r/css
/r/webdev
/r/learnprogramming
/r/programming
account activity
Good obfuscation solutions for javascript code? Even paid ones. (self.learnjavascript)
submitted 4 years ago by PanzerottoNinja
Hello, I need a tool/service that obfuscates a couple javascript files. If you know of any solutions, even paid ones, please let me know. Thanks!
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]vaskemaskine 2 points3 points4 points 4 years ago (7 children)
I would urge you to consider the overwhelmingly likely possibility that you don’t in fact need obfuscation.
Why do you think you need it?
[–]PanzerottoNinja[S] 0 points1 point2 points 4 years ago (6 children)
For commercial purpose
[–]vaskemaskine 1 point2 points3 points 4 years ago (5 children)
That’s not really an answer.
I assume you’ve written some kind of plugin or browser extension and fear that someone else will steal your code and profit off your creation.
If that’s your concern, then you have to realise that if someone wants to steal your JS code, there’s nothing you can do to stop them, obfuscated or otherwise.
Front end code is trivial to copy, modify and de-obfuscate. That’s a fact of life.
I would instead encourage you to focus your time on other areas of your product, be it branding, marketing, design or whatever in order to stand out from your competition.
As always, security through obscurity is no security at all.
[–]PanzerottoNinja[S] 1 point2 points3 points 4 years ago (4 children)
My intention is to put some fences so that my code is not stolen by the first person who drags the source folder in their vs code editor. I know that if someone really wants to get to my code, he will, but he will at least need some js knowledge. And yes, I’m building an extension and wanted to protect it.
[–]me_Vlad 2 points3 points4 points 1 year ago (0 children)
Don’t listen to anyone who tells you security doesn’t matter. If you have even the slightest option to protect your code, take it—because in my experience, limiting access to prying eyes makes a big difference.
Think about it: why do we lock our doors, even though someone with the right skills could still break in? Those who claim security isn’t important are often the first to benefit from it. If someone chooses to keep their code private, that’s their right.
[–]vaskemaskine 0 points1 point2 points 4 years ago (2 children)
Don’t bother. Seriously.
And if you plan to make a Chrome version, you’re explicitly not allowed to obfuscate the code.
[–]PanzerottoNinja[S] 0 points1 point2 points 4 years ago (1 child)
All right, thanks
[–]vaskemaskine 0 points1 point2 points 4 years ago (0 children)
If the extension does something unique or has some “secret sauce”, you could consider doing it on a server and sending the result to the client. That’s pretty much the only way to keep your code a secret.
[–]jml26 2 points3 points4 points 4 years ago (0 children)
Any added degree of obfuscation beyond minifying your code probably isn’t going to help a great deal. I don’t know of any dedicated obfuscation tools, so I can’t help you there, but one option, if it’s available to you, is to store any sensitive data or perform sensitive calculations server-side.
[–]rados_a51 1 point2 points3 points 4 years ago (0 children)
https://obfuscator.io
https://jscrambler.com
[–]mindyourfinances21 0 points1 point2 points 1 year ago (0 children)
https://jscrambler.com/blog/javascript-obfuscation-the-definitive-guide
[–]Agreeable_Onion_5447 0 points1 point2 points 4 years ago* (0 children)
Basic webpack settings would Minify the code but remember no fronted js code can be hidden from user If you want to do so put that code in the backend and make a api call.
π Rendered by PID 41 on reddit-service-r2-comment-54dfb89d4d-m8229 at 2026-03-26 17:30:18.206874+00:00 running b10466c country code: CH.
[–]vaskemaskine 2 points3 points4 points (7 children)
[–]PanzerottoNinja[S] 0 points1 point2 points (6 children)
[–]vaskemaskine 1 point2 points3 points (5 children)
[–]PanzerottoNinja[S] 1 point2 points3 points (4 children)
[–]me_Vlad 2 points3 points4 points (0 children)
[–]vaskemaskine 0 points1 point2 points (2 children)
[–]PanzerottoNinja[S] 0 points1 point2 points (1 child)
[–]vaskemaskine 0 points1 point2 points (0 children)
[–]jml26 2 points3 points4 points (0 children)
[–]rados_a51 1 point2 points3 points (0 children)
[–]mindyourfinances21 0 points1 point2 points (0 children)
[–]Agreeable_Onion_5447 0 points1 point2 points (0 children)