EditorConfig Generator
An .editorconfig file tells every editor on a team to use the same indentation, line endings and charset, so pull requests stop filling up with whitespace-only changes. This generator lets you set those global defaults, add per-file override sections for types like Markdown or Makefiles, and copy or download a ready-to-commit file. The output updates live as you change any option.
How to generate a .editorconfig
- Set the global defaults: indent style (space or tab), indent size, end of line and charset.
- Use the checkboxes to toggle root = true, trim trailing whitespace and insert final newline.
- Click Add override to target a file pattern like *.md, then set its glob and any properties to change.
- For Markdown, tick keep trailing ws so hard line breaks (two trailing spaces) survive.
- Read the live .editorconfig preview, then click Copy or Download to save it.
- Place the file named .editorconfig in the root folder of your project.
Examples
Two-space default with a Markdown override
space indent, size 2, plus *.md keeps trailing whitespace
root = true [*] indent_style = space indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [*.md] trim_trailing_whitespace = false
Tab indentation, no overrides
tab indent, size 4, no per-file sections
root = true [*] indent_style = tab indent_size = 4 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true
Spaces everywhere, tabs only for Makefile
space default plus a [Makefile] override set to tab
root = true [*] indent_style = space indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [Makefile] indent_style = tab
Frequently asked questions
What does root = true do?
It marks this file as the top of the project. EditorConfig normally walks up the folder tree merging every .editorconfig it finds, and root = true stops that search. Set it only in the file at your repository root, and leave it off in nested config files.
When should I use a tab indent style?
Use tabs where the language or format expects them, such as Makefiles (which require real tabs) or Go. You can keep spaces as the global default and add an override section for just those files with indent_style set to tab.
How do per-file overrides work?
Each override is a section with a glob such as *.md or {*.yml,*.yaml}. The generator only writes the properties you actually set in that row, and every other setting is inherited from the [*] section above it, so an override can change one rule and nothing else.
Why does the Markdown override keep trailing whitespace?
In Markdown two spaces at the end of a line create a hard line break. If trim_trailing_whitespace stayed on, your editor would delete those spaces and quietly change how the document renders. The keep trailing ws checkbox emits trim_trailing_whitespace = false for that pattern.
What indent sizes can I choose?
The indent size field accepts whole numbers from 1 to 16. Common choices are 2 for web and config files and 4 for many backend languages. The value is written as indent_size, and EditorConfig also treats it as tab_width unless you set that separately.
Which editors support EditorConfig?
JetBrains IDEs, Visual Studio and many others read .editorconfig with no plugin. VS Code, Vim, Sublime Text and Atom support it through a widely installed extension. Editors that do not understand a property simply ignore it, so the file is safe to commit anywhere.
Does the generator support every EditorConfig property?
It covers the properties teams reach for most: indent_style, indent_size, end_of_line, charset, trim_trailing_whitespace and insert_final_newline, plus tab_width on overrides. Rarely used properties like max_line_length are not exposed, but you can add them by hand after copying.
Is my configuration private?
Yes. The file is assembled entirely in your browser from the options you pick, and nothing is uploaded to a server. You can use the tool offline once the page has loaded.
Learn more
- What EditorConfig is and why teams use it
How a single .editorconfig file keeps indentation, line endings and charset consistent across editors, and how its glob sections are resolved.
Related tools
Prettierrc Generator
Generate a .prettierrc file online. Set print width, semicolons, quotes, trailing commas and more, then copy minimal JSON. Free and private.
Gitattributes Generator
Generate a .gitattributes file online. Normalize line endings, track files with Git LFS, mark vendored paths and export-ignore rules. Free and private.
Gitignore Generator
Build a .gitignore from Node, Python, Java, Go, Rust, macOS, Windows and more. Pick your stacks, copy or download the file. Runs in your browser.
.env to JSON
Convert a .env file to JSON, or JSON back to .env. Parses KEY=value lines, comments, quotes and export. Runs entirely in your browser.
ASCII Table
Full ASCII table for all 128 codes with decimal, hex, octal and binary values, character names and descriptions. Search by code, hex or character.
Aspect Ratio Box Generator
Generate CSS for a responsive aspect-ratio container. Use the modern aspect-ratio property or the padding-top fallback, then copy the ready code.