# How To Insert Code Snippet In Confluence

> To insert a code snippet in Confluence, type /code to open the macro, paste or type your code into the input box, and then click Publish or Update to save the page.

Canonical: https://livedemo.ai/tutorials/how-to-insert-code-snippet-in-confluence/
Apps: Confluence
Updated: 2026-10-05
Interactive demo: https://story-api.livedemo.ai/workspaces/62255d3d3304f17b8f5e2d03/stories/692a3ff9ab56e05a00fe8085/preview?step=1

## Steps

1. Type /code to open the Code Snippet macro.
2. Paste or type your code in the input box.
3. Click Publish or Update to save the page.
