Three situations come up repeatedly: storing a measure in a deployment script or CI pipeline where a newline breaks the surrounding syntax, embedding it in a JSON or YAML file, and pasting it into a tool that only accepts one line — a spreadsheet cell, a ticket field, a chat message. It is also a quick way to compare two measures for real differences without indentation getting in the way.
What happens to my comments?
By default they are removed, because a -- or // comment on a single line would comment out everything after it and silently break the measure. If you switch "Strip comments" off and the expression contains a line comment, the tool refuses rather than hand you something broken — block comments ( /* ... */ ) can be kept safely and are.
Could formatting change what my expression does?
It is designed so that it cannot, and it checks its own work. The tool never rewrites your logic — it splits the expression into tokens (names, literals, operators, comments) and only changes the whitespace between them. Before showing you anything it re-reads its own output and compares the token sequence against your input; if they differ in any way, it discards the result and shows an error instead. A refusal is rare, but it is deliberately preferred over output that looks fine and is subtly wrong.
Are all spaces removed?
Only the ones that carry no meaning. A few are load-bearing and are kept: between two words ( VAR x cannot become VARx ), and between two operators that would otherwise fuse into a different one — 1 - -2 must not become 1--2, since -- would start a comment and delete the rest of the expression. Everything else goes.
Is my expression sent to a server?
No. The formatter is a lexer and layout engine written in JavaScript that runs inside this page, so your expression never leaves your browser and is never logged. You can verify it: open your browser devtools, switch to the Network tab, and format something — there are no requests. This matters more here than for most tools, because a DAX measure often encodes pricing, margin or compensation logic that should not be pasted into a third-party service.