replaces the contents of the clipboard with expr.


  • The expression expr is evaluated and typeset before being copied to the clipboard. To copy a textual form, specify a string or InputForm[expr].
  • CopyToClipboard[Defer[expr]] copies the unevaluated form of expr.
  • CopyToClipboard["string"] copies the contents of "string" as plain text.
  • The expression expr can be any expression, including those that represent notebooks or cells.
  • CopyToClipboard supports typeset expressions, such as StandardForm and TraditionalForm.
  • When pasted in between cells, the results of CopyToClipboard will be at the highest fidelity. Style or formatting information may be lost when pasting into an existing cell or when pasting into an application other than the Wolfram System.


open allclose all

Basic Examples  (4)

Copy a simple expression to the clipboard:

Use Defer to copy an unevaluated form of the expression:

Copy the StandardForm representation of an expression:

Copy the InputForm representation of an expression:

Scope  (3)

Copying a string copies the contents of the string:


Copy a graphic:

Copy an interface:

Generalizations & Extensions  (2)

A series of discrete cells can be copied by using DocumentNotebook:


Copied cells preserve any specified style information:

Applications  (2)

Create a button to copy the contents of an interface:

Pick a point and copy its coordinates:

Properties & Relations  (1)

Copying a cell expression preserves that expression exactly on the clipboard:

Possible Issues  (2)

Evaluation of expressions can have unexpected effects such as reordering the copied result:

All such effects can be prevented using Defer:

When CopyToClipboard receives a string with embedded typesetting, it is copied using linear form:

Wolfram Research (2010), CopyToClipboard, Wolfram Language function,


Wolfram Research (2010), CopyToClipboard, Wolfram Language function,


@misc{reference.wolfram_2020_copytoclipboard, author="Wolfram Research", title="{CopyToClipboard}", year="2010", howpublished="\url{}", note=[Accessed: 15-January-2021 ]}


@online{reference.wolfram_2020_copytoclipboard, organization={Wolfram Research}, title={CopyToClipboard}, year={2010}, url={}, note=[Accessed: 15-January-2021 ]}


Wolfram Language. 2010. "CopyToClipboard." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2010). CopyToClipboard. Wolfram Language & System Documentation Center. Retrieved from