📏.editorconfig Generator

Build the file contents from options and copy

EditorConfig has no official "standard template". The presets above are widely used combinations offered as starting points, taken from Prettier defaults, the Python PEP 8 recommendation and the habits of Go gofmt. None of them is a default set by the format itself, so adjust them to your team rules. Save the file at the top of the repository under the name .editorconfig.

You Might Also Need

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

Why add root = true?

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.

What does indent_size mean when indent_style is tab?

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.

Why keep trailing spaces in Markdown?

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.