Format a Dockerfile

Paste the contents of a Dockerfile written with inconsistent casing: the tool uppercases recognized instructions (FROM, RUN, COPY, CMD...) and aligns their arguments for clearer reading.

Example:

How it works

Each line is analyzed to detect whether it starts with a known Dockerfile instruction (FROM, RUN, COPY, ADD, ENV, EXPOSE, WORKDIR, CMD, ENTRYPOINT...). If so, the instruction is uppercased (the convention recommended by Docker) and its arguments are aligned to a common column, calculated from the longest instruction in the file. Comments (#) and unrecognized lines are left unchanged.

Are comments and blank lines preserved?

Yes, comment lines starting with # and blank lines are kept in place, neither rewritten nor removed.

Is the order of instructions changed?

No, the order of lines remains strictly identical to the original: only the case of the instruction and the alignment of its arguments change, never the image build logic.

Formatting runs 100% locally in your browser: your Dockerfile content is never sent to a server.