Iconize
Details and Options
- The formatted output of Iconize[expr] will evaluate to expr when it is supplied as input.
- It is common to evaluate Iconize[expr] using Evaluate in Place.
- On many platforms, an expression selected in a notebook can be iconized using the Iconize menu item in the context menu for the selection.
- An iconized form can be converted to standard form using Convert to StandardForm.
- With the default setting Method->Automatic, the expression is written as is into the notebook.
- With the settings Method->Compress and Method->BinarySerialize, the respective functions are used to compress the expression prior to writing it into the notebook.
Examples
open all close allBasic Examples (2)
Create an icon that holds the numbers 1 through 100:
Iconize[Range[100]]The icon evaluates to the list when used as input:
{...}//ShortIconize[RandomReal[1, {50, 50}], "Random Matrix"]The icon can also be used as input:
IconizedObject[«Random Matrix»]//DimensionsScope (5)
Iconize["Hello, world."]Iconize[<|"a" -> 1, "b" -> 2|>]Iconize[MinimalPolynomial[Sqrt[2] + Sqrt[3] + Sqrt[5] + Sqrt[7], x]]Iconize[RandomReal[{-1, 1}, {50, 50}], "Weight Matrix"]Iconize[RandomReal[1, 50], "Data vector"]Use the icons in an expression:
IconizedObject[«Data vector»].IconizedObject[«Weight Matrix»].IconizedObject[«Data vector»]Iconize an unevaluated expression:
Iconize[Unevaluated@Range[50]]The icon contains the unevaluated expression:
HoldForm[Range[...]]Outside of a holding construct, normal evaluation occurs:
Range[...]Options (1)
Method (1)
data = RandomInteger[10 ^ 5, {10 ^ 5}];Iconize the data, storing a reference to the output cell for later:
DynamicWrapper[Iconize[data], c1 = EvaluationCell[]]Iconize the data but compress it using Compress:
DynamicWrapper[Iconize[data, Method -> Compress], c2 = EvaluationCell[]]Iconize the data but compress it using BinarySerialize:
DynamicWrapper[Iconize[data, Method -> BinarySerialize], c3 = EvaluationCell[]]Verify that the sizes of the second and third icons in the notebook are indeed smaller:
ByteCount[NotebookRead[#]]& /@ {c1, c2, c3}Properties & Relations (3)
Iconize evaluates its argument:
Iconize[Range[10]]Interpretation allows you to specify an arbitrary appearance of an expression:
Interpretation["two plus two", 2 + 2]The expression is not evaluated by default:
Hold[2 + 2]Iconize has a unique appearance and evaluates its argument by default:
Iconize[2 + 2]Hold[...]Possible Issues (2)
The typeset output produced by Iconize is not the same as the result of evaluation:
result = Iconize[{1, 2, 3}]{...} === resultThe typeset output evaluates to the first argument of the result:
{...} === First[result]When using compression, the iconized form may not be fully equivalent to the original expression:
Iconize[Range[100], "Using Compress", Method -> Compress]Iconize[Range[100], "Using BinarySerialize", Method -> BinarySerialize]When used inside functions that hold their arguments, the altered expression can be seen:
HoldForm[{IconizedObject[«Using Compress»], IconizedObject[«Using BinarySerialize»]}]The original expression is recovered when the iconized form fully evaluates:
%//ReleaseHoldSee Also
Interpretation Defer Thumbnail Snippet Short Shallow $OutputSizeLimit
Menu Items: Iconize Selection Elide with Tear
Function Repository: IconizeAs IconizedView IconizerPalette
Related Workflows
- Shorten Long Inputs with Iconize ▪
- Shorten Long Outputs
Text
Wolfram Research (2018), Iconize, Wolfram Language function, https://reference.wolfram.com/language/ref/Iconize.html (updated 2019).
CMS
Wolfram Language. 2018. "Iconize." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/Iconize.html.
APA
Wolfram Language. (2018). Iconize. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Iconize.html
BibTeX
@misc{reference.wolfram_2026_iconize, author="Wolfram Research", title="{Iconize}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/Iconize.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_iconize, organization={Wolfram Research}, title={Iconize}, year={2019}, url={https://reference.wolfram.com/language/ref/Iconize.html}, note=[Accessed: 13-June-2026]}