Atlassian Tools

How to embed HTML into a confluence page

•

5

min read

how to embed html in confluence

Share Links

Author

Nar Kumar Chhantyal

Founder & CEO

Sharing Links

To embed HTML in Confluence page, install an HTML macro app from the Atlassian Marketplace, such as HTML Macro for Confluence by Narva Software, embed externally hosted HTML with /embed or an iframe app, or use a code block to display HTML as text without rendering it. Confluence Cloud has no native HTML macro, so every rendering option runs through an app or an embed.

3 ways to add custom HTML to a Confluence Cloud page

The three working Confluence HTML macro alternatives are a Marketplace app, an external embed and a code block, and only the first two render HTML. Pick based on whether you need rendering, JavaScript and admin involvement.

Method

Renders HTML

JavaScript support

Admin needed

Cost

Best for

1. HTML Marketplace app

Yes

Yes, in a sandboxed iframe (varies by app)

Yes, to install

Free tier or per-user licence

Custom widgets, custom CSS, inline forms

2. Embed hosted HTML (/embed or iframe app)

Yes, from an external URL

Yes, on the hosted page

No for /embed; yes for an iframe app

Free, plus hosting

Dashboards, existing web tools, large pages

3. Code block

No (display only)

No

No

Free

Documentation and code samples

	 embed html page in confluence

Method 1: Install an HTML Marketplace app

  1. Find the app. Open the Atlassian Marketplace, search for "HTML macro" and filter by Confluence Cloud. Compare ratings, install counts and look at which Atlassian trust signals does the app have. It is also important to check if the app developer company has the SOC 2 Type II certification to ensure the data protection and integrity. 

  2. Install it. A site admin selects Get it now, reviews the requested scopes and approves the installation. Most apps include a 30-day free trial.

  3. Insert the macro. Open the page in edit mode, type /, search for the app's macro name and select it.

  4. Paste your HTML. Add your markup, styles and scripts in the macro editor. Use the preview to check layout.

  5. Publish. Set the frame height if the app asks for one, then publish the page.

Note on sandboxing: the app renders your code inside an iframe. Your CSS styles only the content in that frame, not the surrounding Confluence page. This is also how Confluence custom CSS works in Cloud.



To embed HTML in Confluence Cloud without writing it into the page, host the HTML at a URL and insert it with /embed. The page stays in your control, and Confluence displays it in a frame.

  1. Host the page. Publish the HTML file on a web server, static host or internal portal your readers can reach.

  2. Check frame headers. The host must allow framing. An X-Frame-Options: DENY header or a restrictive CSP frame-ancestors rule blocks the embed (see MDN: X-Frame-Options).

  3. Insert the embed. Type /embed, paste the URL and choose the embed view.

  4. Size the frame. Drag the handles or set width and height. Without a set size, an HTML iframe defaults to 300 × 150 pixels, per the MDN iframe reference.

When /embed falls back to a plain link, use a Confluence Cloud iframe app from the Marketplace. These apps give you a raw iframe with explicit width, height and scrolling controls.

Method 3: Show HTML as code (no rendering)

Use a code block when readers need to see HTML, not run it. Type /code, paste the snippet and set the language to HTML for syntax highlighting.

  • Works on every Confluence Cloud plan, including Free.

  • Needs no admin action and no app.

  • Carries zero script risk because nothing executes.

Choose this for developer documentation, email templates and style guides.

What can you do with the HTML Macro for Confluence app?

HTML Macro for Confluence by Narva Software lets Confluence Cloud editors write HTML, CSS and JavaScript directly on a page and see it rendered, with no external hosting. It brings back what the Server HTML macro offered, inside a secure frame.

What teams build with it:

Permissions, security and limits

In Confluence Cloud, only site admins install apps, while any editor can use an installed HTML macro unless the admin restricts it.

  • Who installs: site admins (or org admins) install and remove Marketplace apps. Editors can request an app from the Marketplace listing.

  • Script restrictions: to add JavaScript to a Confluence page, you need an app that supports it. Native pages strip <script> tags and inline event handlers.

  • CSP and sandboxing: Forge apps run in an iframe with the sandbox attribute and a CSP. Scripts cannot read the parent page, the user's session or other Confluence content.

  • Data residency: Atlassian offers data residency for Confluence Cloud in regions such as the US, EU and Australia. Check that the app also supports your region, or that it stores no data outside Atlassian.

  • App vetting: prefer apps with the "Runs on Atlassian" badge, a published security policy and participation in the Atlassian Marketplace Bug Bounty program.

Nar Kumar Chhantyal

Founder & CEO

Nar is the founder of Narva Software and a former software developer with real-world experience using Atlassian tools. After facing the limitations of Jira and Confluence himself, he set out to build simple, effective apps that make teamwork easier. Today, his focus is on creating practical solutions that help teams work faster and smarter — and are trusted by companies around the world.

You might also like...

OpenAPI Confluence

OpenAPI (Swagger) for Confluence is a new Atlassian Marketplace app by Narva Software that turns any OpenAPI or Swagger spec into interactive API documentation on a Confluence Cloud page.

6
min
How to Bulk Export Confluence Pages to Markdown

Pick the right method to migrate Confluence to Markdown for Git, a docs site or an AI pipeline.

8
min
confluence markdown exporter vs pandoc api

Use a dedicated app such as Markdown Exporter for Confluence by Narva Software when you need a page, page tree or entire space turned into Markdown without writing code

11
min