.editorconfig Generator

Generate .editorconfig files with indent style, indent size, end-of-line, charset, and per-file-type overrides. Presets for Go, Python, Java, and more.

Presets

Global [*]

File-specific Rules

[]
[]

Output

When an EditorConfig generator is the right tool

Use this page to draft a root .editorconfig with global indent, line-ending, and charset defaults, plus a few filename-pattern overrides. The preview updates as you type. For ignore rules, use gitignore Generator.

Use cases

Starting from a preset

Default, Go, Python, or Java fills both the [*] section and some file rules. You can still edit them afterward. A preset click overwrites the form, including rules you added.

Adding a path-specific indent

Add Rule, set a pattern such as *.go, and enable the indent_style or indent_size checkbox before those values are written. A rule with both boxes off still emits an empty section, which is why the Default preset’s [*.md] block has no keys.

How the file is built

The global section always includes all six keys. Boolean options are written as true or false. File rules follow in order. Empty patterns are skipped.

Example — the Default preset, including the empty [*.md] section
# EditorConfig — https://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]

[Makefile]
indent_style = tab
indent_size = 4

What this tool does not do

It does not apply the file to your editor, validate patterns, or offer every EditorConfig property. Generation stays in your browser.

How to use .editorconfig Generator

  1. Pick a preset if you want a starting point, then adjust the [*] options.
  2. Add or remove file-specific rules and enable the indent overrides you need.
  3. Copy or Download the file and place it at the root of your project.

Frequently asked questions

How does .editorconfig Generator work?

The preview updates as you change the global [*] options (indent style and size, end of line, charset, trim_trailing_whitespace, and insert_final_newline) and any file-specific rules. The file always starts with a comment, root = true, and a [*] section. Copy or Download saves a file named .editorconfig. Generation runs in your browser.

What do the Default, Go, Python, and Java presets set?

Each preset replaces the whole form. Default is 2-space, LF, UTF-8, with a Makefile rule that uses tabs and size 4, plus a *.md rule that has no overrides enabled — so the default file contains an empty [*.md] section. Go uses tabs globally. Python uses 4-space and a *.py override. Java uses 4-space globally, with 2-space overrides for *.xml and *.yml.

What can a file-specific rule change?

Only indent_style and indent_size, and only when the corresponding checkbox is on. You cannot override end_of_line, charset, or the two boolean options per pattern. Indent size can be 2, 4, or 8. A rule whose pattern is blank is omitted entirely. Patterns are written as [pattern] after a trim.

Are properties such as max_line_length or tab_width available?

No. The generator emits the six global keys listed above, plus optional indent overrides on later sections. There is no max_line_length, tab_width, quote_type, or unset syntax. Editors still read any extra keys you add by hand after you download the file.

Related tools and guides

References

  • File format and supported keys are defined at editorconfig.org. This page always writes root = true and does not emit every key the specification allows.