Editorconfig Generator

Generate an .editorconfig file — consistent indentation, line endings and charset across editors.

100% FreeNo sign-upPrivate — runs in your browser

Copied to clipboard

How to use this tool

1
Choose indent style and size

Spaces or tabs, and how wide one indent level is.

2
Choose line endings and charset

lf for Unix/macOS, crlf for Windows; utf-8 in almost all cases.

3
Decide on whitespace rules

Trim trailing whitespace and insert a final newline are the usual defaults.

4
Download as .editorconfig

Save it in your project root and commit it.

Formula & worked example

The file starts with root = true (stop searching parent folders), then a [*] section applying the chosen indent style/size, end of line, charset, trailing-whitespace trimming and final newline to all files. An optional [*.md] section overrides trailing-whitespace trimming to false for Markdown.

Space indent, size 2, lf, utf-8 gives a [*] section with indent_style = space, indent_size = 2, end_of_line = lf, charset = utf-8, trim_trailing_whitespace = true and insert_final_newline = true, under root = true.

Limitations — read this before you rely on it

EditorConfig only sets editor behaviour (indent, line endings, charset, whitespace) — it does not format code, enforce lint rules or reformat existing files on its own. Per-language sections beyond [*.md] are not generated here; add them by hand.

Frequently asked questions

A standard file (.editorconfig) that tells editors to use the same indent, line endings and charset, so a project looks consistent across editors.

Many modern editors support it natively; some need a plugin. Check your editor's EditorConfig support.

No. It sets editor behaviour for new edits; it does not run a formatter over existing files. Pair it with Prettier or your linter for enforcement.

Two trailing spaces in Markdown mean a hard line break, so trimming them changes rendering. The [*.md] section disables trimming there.

It stops EditorConfig from looking for settings in parent folders above your project root.