Skip to main content
Modern Code Blocks for Confluence icon
Confluence App

Modern Code Blocks for Confluence

Modern Code Blocks replaces Confluence’s built-in code macro with the Monaco editor — the same engine that powers VS Code. Get syntax highlighting for 85+ languages (JSON, XML, YAML, SQL, Python, and more), 50+ themes, a side-by-side diff view, collapsible blocks, one-click copy, and automatic light/dark theme detection.

Free for up to 10 users · Cloud · Atlassian Marketplace

Features

Why teams choose Modern Code Blocks

Monaco editor

The same editor that powers VS Code — real syntax highlighting, IntelliSense, and bracket matching.

85+ languages

JSON, XML, YAML, SQL, Python, Go, Rust, and 80+ more, each with accurate highlighting.

50+ themes

Match your team’s preference with 50+ themes and automatic light/dark mode detection.

Diff view & copy

Show before/after diffs inline, and give readers a one-click copy button on every block.

Getting started

How it works

  1. 1

    Insert the macro

    Edit a Confluence page, type /code, and select Modern Code Blocks for Confluence.

  2. 2

    Pick language & theme

    Choose from 85+ languages and 50+ themes. Paste your code — JSON, XML, SQL, anything.

  3. 3

    Save with auto dark mode

    Save and the block follows the reader’s light/dark mode automatically, with a copy button included.

FAQ

Frequently asked questions

Confluence’s built-in code macro is basic. Modern Code Blocks uses the Monaco editor (from VS Code) to render JSON, XML, YAML, SQL, and 80+ more languages with proper highlighting, themes, and a copy button.

Comparison

How Modern Code Blocks compares

FeatureModern Code BlocksAlternatives
Editor engineMonaco (VS Code engine)Basic textarea / Ace
Languages85+ with IntelliSense20-40, basic highlighting
Themes50+ + auto dark/lightLight only or fixed
Diff viewBuilt-in side-by-sideNot available
Copy buttonOne-click on every blockManual select
Forge-nativeYes, data stays on AtlassianConnect, vendor-hosted
Use cases

What teams do with Modern Code Blocks

  • Embed syntax-highlighted JSON, XML, and YAML in API documentation pages
  • Show before/after code diffs in release notes and pull-request reviews
  • Create a code-snippet library with one-click copy for onboarding engineers
  • Document SQL queries with proper formatting in data team knowledge bases
  • Display multi-language code samples in tutorials and how-to guides

Ready to try Modern Code Blocks for Confluence?

Install from the Atlassian Marketplace. Free for up to 10 users.

Get it now