Back to Help Center

How do I copy a code block?

Reviewed October 19, 2026

On desktop web, hover over a code block to reveal Copy. On a touch screen, tap the block once to reveal Copy, then tap Copy.

Answer

Tap outside the block to hide the touch overlay. Keyboard focus also reveals Copy, and screen-reader navigation keeps it available. The code block’s layout stays the same.

Requested HTML, XML, JSON and other source examples appear inside code blocks so their syntax can be copied. Ordinary replies use readable text and Markdown. Code shown in a message is not executed.