Boneyard Tools

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

  1. Set the global defaults: indent style (space or tab), indent size, end of line and charset.
  2. Use the checkboxes to toggle root = true, trim trailing whitespace and insert final newline.
  3. Click Add override to target a file pattern like *.md, then set its glob and any properties to change.
  4. For Markdown, tick keep trailing ws so hard line breaks (two trailing spaces) survive.
  5. Read the live .editorconfig preview, then click Copy or Download to save it.
  6. 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

Related tools