Skip to content
100% local

EditorConfig generator

Generate a .editorconfig file that keeps indentation and line endings consistent across editors.

Output

EditorConfig generator

.editorconfig is the small file that stops a project's code style from drifting every time someone opens it in a different editor. This tool builds one for you from a few simple choices, instead of you copying a template from memory and hoping the syntax is still right.

Pick spaces or tabs and the indent width, the file encoding, and whether lines end with LF (Unix and macOS) or CRLF (Windows). Toggle "Insert final newline" so every file ends with exactly one line break, and "Trim trailing whitespace" so editors quietly strip the stray spaces that show up as noise in diffs. A max line length is optional — leave it at 0 to skip the setting entirely, or set it to enforce wrapping in editors that support it.

Two extra sections handle the cases that need their own rules. Makefiles require real tab characters to indent recipe lines — make fails outright if a space sneaks in — so turning on the Makefile section pins indent_style = tab for [Makefile] regardless of your general preference. Markdown treats two trailing spaces at the end of a line as a deliberate hard line break, so its section disables trailing-whitespace trimming for [*.md] to stop editors from erasing formatting the author meant to keep.

Everything is generated locally in your browser as you change options — nothing about your project, its file names or its structure is sent anywhere. Copy the result straight into a new .editorconfig at your repository root, download it as a .txt file to rename yourself, or tweak an option and watch the output update instantly.

FAQ

Where does the .editorconfig file go?
Save it as .editorconfig (no extension) in the root of your project. Editors with EditorConfig support pick it up automatically for every file underneath.
Why does the Makefile section always use tabs?
Make requires actual tab characters to indent the commands inside a recipe; a line indented with spaces causes a "missing separator" error. The generated [Makefile] section pins indent_style = tab so that rule survives even if your general style is spaces.
Why does the Markdown section turn off trimming trailing whitespace?
In Markdown, two trailing spaces at the end of a line insert a hard line break. If an editor trims trailing whitespace globally, it silently deletes that formatting, so the [*.md] section switches trim_trailing_whitespace off.
What does "max line length" actually do?
It sets max_line_length, a hint some editors and linters use to show a ruler or wrap text at that column. It doesn't reformat existing files by itself — set it to 0 to leave the setting out entirely.
Is anything about my project uploaded anywhere?
No. The file is generated entirely in your browser from the options you choose — nothing is sent to a server.