This interactive demo was created free with Storylane in 2 minutes. Create your own demo
This interactive demo was created free with Storylane in 2 minutes. Create your own demo
Start free
All Tutorials /Notion

How to Add Code in Notion

Updated on:
May 25, 2026
By:
Madhav Bhandari
Use this interactive demo to learn how to insert a formatted code block in your Notion page.

Quick summary

Notion's built-in code block lets you insert and format code in any page using a simple slash command, with support for multiple programming languages including SQL, HTML, and more.


Steps

  1. Click the blank space where you want the code block to appear.
  2. Type /code to open the block menu.
  3. Click Code from the dropdown menu.
  4. Paste or type your code inside the code block.
  5. Click the language dropdown in the top right corner of the code block.
  6. Choose the coding language you want to use for formatting.
  7. Your code block is now successfully added in Notion.

📌 Why this matters

Notion's code block feature allows developers, technical writers, and teams to embed syntax-highlighted code snippets directly inside any Notion page without third-party tools. By using the /code slash command, users can instantly insert a formatted code block and select from dozens of supported programming languages for proper syntax rendering. This keeps technical documentation, wikis, and project proposals clean and readable inside a single workspace. It eliminates the need to switch between tools when sharing code alongside written content.
Your product deserves an interactive demo
Start free
Similar Articles
Notion

How to Archive a Page in Notion

Madhav Bhandari
Director of Marketing @ Storylane
Notion

How to Embed a YouTube Video in Notion

Madhav Bhandari
Director of Marketing @ Storylane
Notion

How to Copy a Notion Page

Madhav Bhandari
Director of Marketing @ Storylane
No items found.
Platform
Interactive Demos
Sandbox Demos
Buyer Hub
RepX
Integrations
Solutions
Product Marketers
Growth & Demand Gen
Sales Reps & AEs
Presales & SEs
Customer Success
Product Managers
Customers
Demo Showcase
Customer Stories
Finer Demos Club
Features
Demo Signals
Personalization
Deal Intelligence
Resources
Blog
The Plot
Tutorials
Events & webinars
Help Docs
What’s New
Demo Dundies
Company
Careers
Pricing
Partners
Contact
Trust Center
Backed by
Chrome Extension Icon
Chrome extension
Download
Desktop app
Download
Built in San Francisco Bay Area - ©2026 Storylane
Privacy PolicyTerms & Conditions
X Corp (formerly Twitter)LinkedIn
This website uses cookies to ensure you get the best experience on our website. Learn More
Got it
This website uses cookies to ensure you get the best experience on our website. Learn More
Got it