@ and . are not special characters in HTTP URIs.

The characters that need encoding include space (which becomes +), + itself, and %, which is used to hex-encode.

Other characters outside the normal ASCII range of 32 - 127 and various other characters within that range use that % hex encoding.

For correct handling, you should consider using encodeURIComponent() but only on the part of the URI that was user supplied. If you encode the entire URI that way you'll get an invalid URI.

Answer from Alnitak on Stack Overflow
🌐
URL Encode
urlencoder.org › enc › email
URL Encoding of "email" - Online
Encode email to URL-encoded format with various advanced options. Our site has an easy to use online tool to convert your data.
🌐
Designcise
designcise.com › web › tutorial › how-to-encode-an-email-in-javascript-for-use-in-the-query-string
Encode Email in JavaScript to Use in Query String - Designcise
June 11, 2021 - To use an email in the query string component of a URL, you can encode it using the encodeURIComponent() function in JavaScript. This would encode all characters except A-Z a-z 0-9 - _ . ! ~ * ' ( ). For example: const email = 'foo.bar_baz+...
🌐
Mastering JS
masteringjs.io › tutorials › fundamentals › encodeuricomponent
The encodeURIComponent() Function in JavaScript - Mastering JS
encodeURIComponent() ensures that email. For example: const email = 'john@gmail.com&param=somethingelse'; await fetch(`https://httpbin.org/get?email?email=${email}`). then((res) => res.json()); // { email: 'john@gmail.com', param: 'somethingelse' ...
🌐
Email-encoder
email-encoder.com
Protect your email address from spam | Email Encoder
Encode your email address to prevent spam and hide it from spammers. Paste the generated code into your source code and you are safe.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › encodeURIComponent
encodeURIComponent() - JavaScript - MDN Web Docs
October 30, 2025 - The encodeURIComponent() function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters).
🌐
Medium
medium.com › @tempmailwithpassword › integrating-email-addresses-into-website-urls-with-the-params-method-92d4bad2dad1
Using the PARAMS Method to Include Email Addresses in Website URLs
August 24, 2024 - Email addresses can be encoded using the JavaScript function encodeURIComponent() to ensure that special characters, such as the ‘@’ symbol, are properly formatted for URL inclusion without breaking the structure.
🌐
Ecenica Hosting
ecenica.com › support › answer › how-to-obfuscate-your-email-address-in-html
How To Obfuscate Your Email Address In HTML - Ecenica
Base64 Encoding: Encode your email in Base64 and use JavaScript to decode it. Convert your email address into HTML character entities.
Find elsewhere
🌐
Rumkin
rumkin.com › tools › mailto-encoder
Email Address (Mailto:) Encoder
If you are interested in using ... in the source of the website, check out the HTML Encoder on this site. These tools do not steal your email addresses. Nothing is sent back to the server, and everything runs in JavaScript in your browser....
🌐
W3Schools
w3schools.com › tags › ref_urlencode.ASP
HTML URL Encoding Reference
If you click the "Submit" button below, the browser will URL encode the input before it is sent to the server. A page at the server will display the received input. Try some other input and click Submit again. In JavaScript, PHP, and ASP there are functions that can be used to URL encode a string.
🌐
Eric Meyer
meyerweb.com › eric › tools › dencoder
URL Decoder/Encoder
The URL Decoder/Encoder is licensed under a Creative Commons Attribution-ShareAlike 2.0 License.
🌐
Knechtology
knechtology.com › stop-spam › email_encoder.html
Stop Email Harvesters & Spam - Encode Your Email Addresses For Free - K'nechtology
Simply type in the email address in the first textbox, hit encode, and it will return the complete HTML mailto: code encoded in hexadecimal values. Once encoded, you simply need to copy all the encoded content and paste it into web page. The encoded e-mail address will work on any web page ...
🌐
Andrew Lock
andrewlock.net › simple-obfuscation-of-email-addresses-using-javascript
Adding simple email address obfuscation for your blog like Cloudflare Scrape Shield
April 21, 2020 - Given you have an email address you want to obfuscate on your site, e.g. [email protected], how can you encode that in the required format? I wrote a small JavaScript function that takes an email address, and a key in the range 0-255 and outputs an obfuscated email address.
🌐
Wbwip
wbwip.com › wbw › emailencoder.html
Email Address Encoder - West Bay Web
This encoded e-mail address can be read and translated back into its original ascii text by almost any web browser without any further action on your part. Just replace all instances of your e-mail address on your pages with the code, and you won't have to worry (too much) about spam lists. ... "For more information, send email to <A HREF="mailto: &#121;&#111;&#117;&#114;&#110;&#097;&#109;&#101;&#064;&#100;&#111;&#109;&#097;&#105;&#110;&#046;&#099;&#111;&#109;"> &#121;&#111;&#117;&#114;&#110;&#097;&#109;&#101;&#064;&#100;&#111;&#109;&#097;&#105;&#110;&#046;&#099;&#111;&#109; </A>"
🌐
Frontend Masters
frontendmasters.com › blog › encoding-and-decoding-urls-in-javascript
Encoding and Decoding URLs in JavaScript – Master.dev Blog
For example, because URLs cannot ... encoded as “&”. JavaScript provides two functions for encoding URLs: encodeURI() and encodeURIComponent()....
🌐
GitHub
gist.github.com › luiskabes-arch › 186e2da8f2a23bd40d95d05a19e5a9c2
Encode an email on mailto: link · GitHub
Learn more about clone URLs · Clone this repository at &lt;script src=&quot;https://gist.github.com/luiskabes-arch/186e2da8f2a23bd40d95d05a19e5a9c2.js&quot;&gt;&lt;/script&gt; Save luiskabes-arch/186e2da8f2a23bd40d95d05a19e5a9c2 to your computer and use it in GitHub Desktop. Download ZIP · Encode an email on mailto: link ·