Tool-page

Power Fx Formatter / Beautifier

Cleanly indent long If, Switch and Patch formulas. Only whitespace changes, function names, values and comments stay the same.

The formatter adds line breaks and indentation along the bracket levels. Short calls such as IsBlank(txt.Text) stay on one line, comments with // and /* */ are kept. Formulas that use a semicolon as separator (de-DE) are detected automatically, and missing quotes or brackets are reported instead of being added silently.

Open Power Fx Formatter

Free. You enter your email address once, then all tools are unlocked. Your data is processed locally in your browser.

How it works

  1. Paste a Power Fx formula.
  2. Click Format, the tool detects the separator.
  3. Copy the indented formula.

Example: before and after

// Before
If(IsBlank(txt.Text), Notify("Missing"), Patch(T, Defaults(T), {A: 1}))

// After
If(
    IsBlank(txt.Text),
    Notify("Missing"),
    Patch(
        T,
        Defaults(T),
        {A: 1}
    )
)

Frequently asked questions

Is the Power Fx formatter free?

Yes.

Does the tool change my formula?

No, it only changes indentation and line breaks. Function names, values, separators and comments stay unchanged.

Does it work with semicolons as separators?

Yes. Formulas in de-DE notation with ; and ;; are detected automatically, or you pick the notation yourself.

Does it translate commas to semicolons?

No. Use the Power Fx Translator for that.

Can I paste the formatted formula back?

Yes, Power Apps accepts line breaks, indentation and comments in formulas.

Related tips

All tips in the archive

Microsoft and the Power Platform product names (for example Power Apps, Power Automate, Copilot Studio) are trademarks of the Microsoft group of companies. This is an independent website. It is not operated, sponsored or endorsed by Microsoft.