There are several ways you can add custom code to your WordPress.com website. This guide explains which types of code can be added to your website, depending on your WordPress.com plan.
The type of code you can add to a WordPress.com website depends on your plan level:
- Free sites and sites with a Personal or Premium plan have limits to code that can be added. Restrictions are in place to ensure the safety and security of all sites that share this hosting environment.
- Business and Commerce plan sites have no limits to the code you can add, once you activate your plan.
If you wish to use an iframe, javascript, or other code on a site without upgrading to a supported plan, consider the following alternatives:
- There are several ways to safely share videos, audio files, and documents on any WordPress.com site.
- You can embed content from many popular services without code. See the full list of supported platforms, including YouTube, Spotify, Giphy, all major social media platforms, and more.
- WordPress.com includes many additional features that are accessible without the need for code or plugins. These features include contact forms, galleries, Google Analytics, payment buttons, events, polls, quizzes, appointment scheduling, restaurant bookings, and more. See this guide for a list of included features.
HTML is the language of every webpage you visit on the internet. It uses special codes (called tags) to structure and organize the content of a webpage, such as text, images, links, and multimedia. All WordPress.com sites can use the following HTML tags:
aaddressabbracronymareaarticleasidebbigblockquotebrcaptionciteclasscodecol
deldetailsdddivdldtemfigurefigcaptionfooterfonth1, h2, h3, h4, h5, h6headerhgroupi
imginskbdlimapmarkolppreqrprtrtcrubyssectionsmall
spanstrikestrongsubsummarysuptabletbodytdtfootththeadtrttuulvar
In addition, sites with a plugin-enabled plan and activated hosting features can use the following codes:
embed, frame, iframe, form, input, object, textarea, script, style, link
You can insert a custom HTML block for smaller snippets of HTML.
You can edit HTML directly in the WordPress Editor in two ways:
In the toolbar for each block (that appears when you click on the block), the ellipsis, or the three dots, has an “Edit as HTML” option to edit the HTML for just that specific block.

If you want to edit the entire page in HTML, click the ellipsis in the top-right corner and select “Code editor” to switch to HTML.
By default, the code editor uses syntax highlighting. You can disable this on a per-user, per-site basis by following these steps:
- Visit Users → Profile in your site’s dashboard.
- Check the box next to “Disable syntax highlighting when editing code”.
- Click the “Update Profile” button to save your changes.

CSS handles the presentation and appearance of HTML web content. CSS can control the colors, fonts, sizes, spacing, and positioning of elements on a webpage.
CSS editing is supported on sites the Premium, Business, or Commerce plan. Visit our Custom CSS guide to learn more.
JavaScript brings interactivity and dynamic elements to web pages. JavaScript is used to create engaging features like interactive forms, animations, and responsive design.
JavaScript codes typically begin with a <script> tag and may be used on sites with a plugin-enabled plan. You can insert JavaScript code using a Custom HTML block or another method from the following section that describes how to insert code.
JavaScript from trusted partners, such as YouTube and Google Maps, can be converted to a supported embed or shortcode on any plan.
⚠️
Be extra careful when adding custom code that may make your site vulnerable to attacks. We recommend that you only add code that comes from a reputable source. If you are ever in doubt, err on the side of caution and look for an alternative method.
With the limitations described above, you can add code to your site using the most appropriate method for your goals. The following methods can work for inserting most code, including iframes and JavaScript:
- Embed code onto a page or post using the Custom HTML block.
- Upload images, video, audio, and documents directly. See Accepted File Types for more.
- Verify your site with Google Search, Bing, Pinterest, Yandex, and Facebook Business. See Site Verification Services.
- Display source code using the SyntaxHighlighter Code block.
Plugin-enabled sites with activated hosting features only:
- Add verification codes for services like AdSense, Facebook, and Mailchimp via a plugin. See Add Code to Headers.
- Add code to functions.php via a plugin like Code Snippets.
- Edit your site files directly using secure FTP (SFTP).
- Install a plugin to add virtually any feature to your website.
- Create a child theme to make theme modifications.