root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
About EditorConfig Generator — Create .editorconfig
A stray tab where everyone else uses spaces, a file saved with CRLF line endings on a Unix team, a diff that's all whitespace noise — these are the small frictions that an .editorconfig quietly fixes. The file lives in your repository and tells every supporting editor and IDE how to handle indentation, line endings, character encoding, and trailing whitespace, so the whole team writes consistent code without thinking about it.
This .editorconfig generator builds a ready-to-drop file from a handful of choices: indent style and size, charset, end-of-line style, trailing-whitespace trimming, and final-newline insertion. Add per-glob overrides when Markdown, YAML, or Makefiles need their own indentation, and copy the result straight into your project root.
Everything runs in your browser. Your preferences never leave your device, so you can create an .editorconfig offline and paste it wherever you need it.
Features
- Emits root = true plus a universal [*] section
- Indent style and size, charset, and end-of-line control
- Toggle trailing-whitespace trimming and final newline
- Add per-glob overrides for files that need different indentation
- Live output you can copy in one click — fully offline
How to use
- Choose your indent style and size, charset, and line-ending style.
- Toggle trailing-whitespace trimming and final-newline insertion.
- Add per-glob overrides (like *.md or *.{yml,yaml}) with their own indent size.
- Copy the generated .editorconfig into the root of your project.
Frequently asked questions
What does root = true do in an .editorconfig?
It marks this file as the top-most .editorconfig for the project. EditorConfig walks up the directory tree merging rules, and root = true tells it to stop searching parent folders, so settings outside your project cannot leak in.
Do I need an editor plugin for .editorconfig to work?
Many editors support EditorConfig natively, including VS Code, the JetBrains IDEs, and Vim with a plugin. Others need a small extension. Once installed, the editor reads the nearest .editorconfig and applies the rules automatically as you type and save.
How do per-glob overrides work?
Each override becomes its own INI section, like [*.md], carrying only the keys that differ from the universal [*] section. EditorConfig matches files against these patterns and layers the override on top of the global rules, so Markdown or YAML can use a different indent size.
Is my configuration sent to a server?
No. The .editorconfig is assembled entirely in your browser with plain JavaScript. Nothing you choose leaves your device, so the generator works offline and is safe for private repositories.
Related tools
Everything runs locally in your browser — your input is never uploaded.