Assembling an .editorconfig from options
Choose an indent style and size, line endings, charset, trailing-whitespace handling and the final newline, and the file contents appear ready to save, with a copy button attached. Anything you leave blank is dropped from the output, so you never have to hard-code a setting your team has not agreed on.
EditorConfig has no official standard template. The presets here are widely used combinations offered as starting points, drawn from Prettier defaults, the Python PEP 8 recommendation and the habits of Go gofmt. As of October 2026 none of them is a default set by the format, so you are under no obligation to follow one. The Markdown and Makefile sections are exceptions with clear reasons behind them, which is why a single checkbox adds each.
This page only produces the file contents; it does not check whether your editor honours them. Support for properties such as max_line_length varies between editors. Merging an existing .editorconfig and validating glob patterns are not supported.
Frequently Asked Questions
It marks that file as the end of the search. With it present, no .editorconfig in a parent directory is consulted, which keeps settings from outside the repository from leaking in. It normally goes in the file at the repository root.
It controls how many columns wide a single tab appears. The stored character stays one tab and is never turned into spaces. Use tab_width when you want to set the displayed width separately.
Markdown reads two trailing spaces as a hard line break. Stripping them globally changes how documents render, so turning the setting off in a [*.md] section alone is the common practice.