Skip to content

How to Create a Click to Text Link

lady surprised looking at phone

Have you ever wanted to add a link to a button or hyperlinked text to send a text message?

Better yet, what if the link had pre-populated text?

That'd be pretty slick. Well, keep reading to find out how to accomplish this simple yet powerful tactic.

Step 1: Determine the phone number you want to text

Determine the phone number you want the text message sent to including the country code and area code. For this example, we will use +14055551230

Step 2: Use a URL encoder to write a pre-populated message

Use a URL encoder such as this one to write your message you would like to have pre-populated. Here's an example message: Hi%2C%20I%20just%20read%20your%20article%20on%20how%20to%20create%20a%20text%20link.%20I%20plan%20to%20use%20it%20for

Step 3: Bring it all together as a link using sms & body

Use this format to bring together step 1 & step 2: <a href="sms:{step 1}&body={step 2}">{text to display}</a>

This is what the example code would look like:

<a href="sms:+14055551230&body=Hi%2C%20I%20just%20read%20your%20article%20on%20how%20to%20create%20a%20text%20link.%20I%20plan%20to%20use%20it%20for">Send me a Text</a>

Try it out here:

 

Want to use a button instead of a link? Add the button tags before and after the text to display.

<a href="sms:+14055551230&body=Hi%2C%20I%20just%20read%20your%20article%20on%20how%20to%20create%20a%20text%20link.%20I%20plan%20to%20use%20it%20for"> <button>Send me a Text</button></a>