codefmt, back to formatter

codefmt vs. Zapier's built-in Formatter

These two share a name and do different jobs. Zapier's built-in Formatter is a data-transform step for working with dates, text, numbers, and utility values inside a Zap. codefmt is a code formatter and linter for the JavaScript and Python you write inside the Zapier Code action. If you searched for a way to beautify source code in your Zap, codefmt is the right tool. If you want to transform values flowing between steps, the built-in Formatter is the right tool.

tl;dr

pick codefmt if: you are looking at a Code by Zapier action and want to format, beautify, or lint the JavaScript or Python you wrote inside it.

pick Zapier Formatter (built-in) if: you want to manipulate a value coming out of a previous step: parse or format a date, change text case, split a string, do arithmetic, or pick a value from a list.

what each one is

codefmt: a free formatter and linter for source code, available as a web app at codefmt.dev and as a free Chrome and Firefox extension. It wraps JavaScript snippets in the Code by Zapier async shell before formatting, so top-level await and bare return statements parse cleanly. It also formats Python with Ruff, recognizes Zapier globals such as inputData, output, fetch, and StoreClient, and runs oxlint for JavaScript and Ruff lint for Python.

Zapier Formatter (built-in): a first-party action inside the Zapier app, listed under Built-in apps as Formatter by Zapier. It exposes value-transform utilities grouped by type: Date / Time, Numbers, Text, Utilities, and a few others. Each option takes a value from an earlier step (for example a date string from a Trigger) and returns a transformed value (for example the same date in a different format).

side by side

featurecodefmtZapier Formatter (built-in)
what it operates onJavaScript or Python source code inside the Code by Zapier actionvalues flowing between steps in a Zap
typical usebeautify a Code step you authored, catch lint errors before publishingreformat a date, change text case, parse JSON, do arithmetic on a number
where it runsoutside the Zap, in your browser or via the codefmt APIas a step inside the Zap, every time the Zap fires
inputa code snippet you paste or select in the Zapier editorfield values mapped from previous steps
outputthe same snippet, reformatted and linteda transformed value passed to the next step
pricefreeincluded with a Zapier plan
where to find itcodefmt.dev or the browser extensioninside the Zap editor, add Action, search Formatter

frequently asked questions

I searched Zapier formatter expecting to format code, what am I looking for?

If you want to beautify or lint the JavaScript or Python inside a Code by Zapier action, you want a code formatter, not the built-in Formatter action. The built-in Formatter handles dates, text, numbers, and other value transforms; it does not reformat source code. codefmt is designed for the source-code case: paste the Code action body at codefmt.dev or use the Chrome or Firefox extension to format it directly in the Zapier editor.

can the Zapier built-in Formatter beautify JavaScript or Python?

No. The built-in Formatter is a data-transform step. Its options operate on dates, text strings, numeric values, lists, and utility transforms. There is no option to take a block of source code and return it reformatted. For that, use codefmt or another external formatter.

should I use codefmt inside a running Zap, or only when authoring?

codefmt is designed for the authoring step. You write or paste a Code action body, run it through codefmt to clean it up, then save it in the Zap. The Code action itself runs inside Zapier with no codefmt involvement. If you want to call the codefmt format API at Zap runtime (for example to format user-submitted code arriving in a webhook), the API endpoint at codefmt.dev/api/format accepts a POST with the snippet and platform, and returns formatted code.

does codefmt handle Code by Zapier specifically, or just generic JavaScript?

codefmt has Zapier-specific support. It wraps your snippet in the same async function shell Code by Zapier wraps it in at runtime, so top-level await and bare return parse cleanly. It registers inputData, output, fetch, callback, and console as known JavaScript globals, and input_data, output, StoreClient, and requests as known Python globals, so they are not flagged as undefined. Standard JavaScript formatters that parse input as a complete program will stop at the first bare return.

is there a Zapier built-in code formatter besides the Formatter action?

Zapier provides a syntax-highlighted editor inside the Code action, but it does not include a one-click reformat or beautify action today. For formatting and linting you use an external tool. codefmt is one option; the Chrome and Firefox extension adds a Fix with codefmt right-click action that formats the selected code in place inside the Zapier editor.

best code formatter for Zapier Code step?

The Code by Zapier action wraps your JavaScript in an async function and lets you use top-level await, bare return, inputData, output, fetch, and callback. A general-purpose formatter that parses input as a complete program will stop at the first bare return. codefmt wraps the snippet in the Zapier shell before formatting and strips the shell afterward, so the output is valid for the Zapier editor. Both web and browser-extension delivery are free.

format Code by Zapier at codefmt.dev/zapier

also format code for Zapier, n8n, Pipedream, Make

related comparisons: codefmt vs. Prettier Playground, codefmt vs. HubL Code Formatter