# pretty-str Return a pretty-formatted string for a value. Same rendering as `pretty`, but returns the result instead of printing it. ## Syntax
[pretty-str $val ?indent]
## Parameters - `$val` — value to format - `?indent` — optional indent width in spaces (number, default `2`) ## Examples
set s [pretty-str %{ :a 1 :b @{"x" "y"}}]
echo $s
[pretty-str $big-map 4]
## Returns A string containing the pretty-rendered value. ## See Also `pretty`, `str`, `echo`