.editorconfig Generator

Create an .editorconfig for indentation, line endings and charset.

About this tool

Choose project-wide defaults (spaces or tabs, indent size, line endings, charset, final newline, trailing whitespace and maximum line length), then tick per-language sections such as Python, Go, Makefile, Markdown, YAML and Windows scripts. Save the result as .editorconfig in your project root.

How EditorConfig works

EditorConfig is a simple, widely supported file that makes editors follow your project's formatting basics, whatever each developer's personal settings are. VS Code (with the extension), JetBrains IDEs, Visual Studio, Vim, Neovim, Sublime Text, Xcode and GitHub's web editor all read it. Sections use glob patterns: [*] applies to every file, and later, more specific sections override it, such as [*.py] with indent_size = 4 for PEP 8. Some formats have hard requirements: Makefiles must indent recipes with tabs, Go code is formatted with tabs, Markdown relies on two trailing spaces for line breaks (so don't trim them there), and Windows batch and PowerShell files expect CRLF. root = true stops editors searching parent directories. Together with Git's .gitattributes it ends tabs-versus-spaces churn and whitespace-only diffs. Honest limits: EditorConfig applies to what you type next, not existing files, so use a formatter or the line ending converter for those. max_line_length is only respected by some editors, and Prettier reads indentation and line endings from .editorconfig unless its own config overrides them. The Prettier config generator, the .gitattributes generator and the line ending converter are related.

Frequently asked questions

What is an .editorconfig file?

A project file that tells editors which indentation, line endings and charset to use.

Where do I put .editorconfig?

In the project root, with root = true at the top.

Does VS Code support EditorConfig?

Yes, with the official EditorConfig extension. JetBrains IDEs and Visual Studio support it built in.

Is anything uploaded?

No. The file is generated in your browser and nothing is stored or sent.