Skip to content
HTMLtoSITE

Inject code into head and body

Last updated: 2026-08-10

Short version — open “More → Code injection” in the editor, paste what you want into the head and body boxes, and save. It's merged in automatically whenever a visitor requests the page. Your original HTML file is never touched, and this is available from the Advanced plan.

At a glance

Time needed
About 3 min
Plan required
Advanced
Coding knowledge
A little
Where to do it
Editor

Step by step

  1. 1

    Open “More → Code injection” in the editor

    The editor's “More” menu has a “Code injection” entry. On free and Starter, opening it just shows a lock notice with the input disabled. It unlocks starting on the Advanced plan.

    The editor's Code injection tab — fields for raw HTML to place in head and body
    What you put here lands in the same spot on every published page.
  2. 2

    Paste something into head

    Anything that belongs inside head — structured data (JSON-LD) is the classic case — goes straight in as-is. Here's a short example for a page like Momo Coffee: a script tag with facts like the shop's name as JSON, so search engines and AI can read exactly what the page is about.

    head injection Copy
    <script type="application/ld+json">{ "@type": "CafeOrCoffeeShop", "name": "Momo Coffee"}</script>
  3. 3

    Paste something into body

    Code that belongs in body — an analytics tag, say — goes into the separate body box. Head and body are split because different services expect their script in one or the other; just follow whatever the snippet's instructions say.

    body injection Copy
    <script> console.log("analytics loaded");</script>
  4. 4

    Save it — it's merged in automatically when visitors load the page

    That's it once you save. This code isn't written into your original HTML file — it's stored separately and merged into head/body the moment a visitor requests the page. That's why it never shows up if you open the editor's “Code” tab (which shows your original file), and the AI edit assistant doesn't touch it either — it's a separate store. Each slot, head and body, holds up to 20,000 characters.

    More › Code injection
    Head character limit 20,000
    Body character limit 20,000
    Original HTML file Unchanged
    Applied Auto-merged on each visitor request

Frequently asked questions

Can I use this on the free or Starter plan?

No, it's available from the Advanced plan and up.

Does the code I paste here get saved into my original HTML file?

No, it's stored separately and only merged in when the page is served. It won't show up in the editor's Code tab.

Is there a character limit?

Yes, up to 20,000 characters each for head and body.

Can the AI edit assistant change this content?

No, it's a separate store, so it isn't something the AI edit assistant touches.

What can I put in here?

Anything that belongs in head or body — analytics scripts, structured data (JSON-LD) — you paste it in as-is.

Trying it is faster than reading about it — paste your HTML now.