Hide your Email Address with the help of Facebook

You probably know that Facebook uses an image format to display email addresses on profile pages.

While most people use this technique to protect their email addresses from spam bots, Facebook converts addresses into images for a completely different reason. They want to prevent their own users from exporting email addresses of their own friends out of the Facebook wall (through scrapping).

Use Facebook-generated Email Images outside Facebook

If you right-click and copy the web address of any email image inside Facebook, the URL would be something like this:

http://facebook.com/string_image.php?ct=ABCD1234&fp=8.7

where ABCD1234 is a unique string that is different for every email address and 8.7 is the font size that is used while rendering the image.

What’s interesting here is Facebook doesn’t require authentication for these URLs.

That means you can directly mention these image addresses in your Twitter messages, in online forums or any other public web pages where you are worried about mentioning your email address in plain text as spam bots might harvest them for the purpose of spamming you.

So the next time someone wants my email address on Twitter, I can point him to this Facebook URL - http://bit.ly/my-email. If I want to embed this email address images on a web page, the code would be:

<img src="http://www.facebook.com/string_image.php?ct=ABCD&fp=20" />

You can vary the font sizes by changing the value of the fp parameter in the URL as I have done in the following examples - these are all dynamically generated images.

Related: Hide Your Email Address from Spam Bots

Amit Agarwal

Amit Agarwal

Google Developer Expert, Google Cloud Champion

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.

Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

0

Awards & Titles

Digital Inspiration has won several awards since it's launch in 2004.

Google Developer Expert

Google Developer Expert

Google awarded us the Google Developer Expert award recogizing our work in Google Workspace.

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards in 2017.

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional (MVP) title for 5 years in a row.

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator title recognizing our technical skill and expertise.

Email Newsletter

Sign up for our email newsletter to stay up to date.

We will never send any spam emails. Promise.