Can I use a HubSpot form on my external site?

Last updated: April 4, 2018

Available For:

Marketing: Free, Starter, Basic, Pro, Enterprise
Sales: N/A
Service: N/A

Forms can be added to external websites with our JavaScript embed code. An advantage of using JavaScript here is that any change made to the form within HubSpot will be automatically reflected on the form on your external site. Follow the instructions below to access your form's embed code.

Please note: if you add a Salesforce campaign to your form, the form's embed code will be changed. In this case, you do need to re-add the code to your external site.

  • Navigate to your forms:
    • In your HubSpot Marketing Basic, Professional, or Enterprise account, navigate to Contacts > Forms.
    • In your HubSpot CRM or Marketing Hub Starter account, navigate to Lead Capture Forms.
  • Click the name of the form you want to embed on your site.
User-added image
Select the Embed tab.
  • Click the Options tab to customize what will happen after a visitor submits your form. You can choose to redirect your visitors to a thank you page or display an inline thank you message when a visitor submits your form.
  • In the top right corner click Actions and select Embed code.
User-added image
User-added image
  • Copy the embed code to your clipboard. 
  • Click Save and Publish in the top-right corner of the screen.
  • Paste the embed code into the desired location of the HTML on your external page. Make sure you've also included your HubSpot tracking code on any external page where you place a HubSpot form. The tracking code will ensure all data submitted on your form gets captured properly.

Please see this article for information on how to style and customize embedded forms.

Was this article helpful?