Dockerfile Formatter: Uppercase Instructions and Tidy RUN Lines

Tidies a Dockerfile: instruction case, continuation indent, blank lines and optional && splitting.

Use the tool

Why this tool exists

Dockerfiles grow long RUN lines that are hard to review. Putting each command of a chain on its own line makes diffs and mistakes visible.

The tool joins continued lines, uppercases instructions, writes FROM ... AS, and splits RUN at top-level && outside quotes and parentheses. Heredoc RUN blocks and JSON-form commands are kept as typed. It honours a custom escape character from a parser directive. It does not check what the commands do.

How to use it

  1. Paste the Dockerfile.
  2. Choose whether to split RUN at &&.
  3. Pick the continuation indent.
  4. Copy the result.

Frequently asked questions

Does it change the image?

Splitting at && only adds line continuations. The command is the same.

Is this a linter?

No. Use the Dockerfile linter for rules.

Are comments kept?

Yes.

Is my input sent anywhere?

No. Everything runs in your browser and nothing is uploaded.