EditorConfig Generator
Generate an .editorconfig file with per-language sections for indent style and size, line endings, charset, trailing whitespace and max line length.
.editorconfig
# 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]
indent_style = space
indent_size = 2
trim_trailing_whitespace = false
max_line_length = off
[*.{js,ts,jsx,tsx}]
indent_style = space
indent_size = 2
max_line_length = 100
[*.{yml,yaml}]
indent_style = space
indent_size = 2
[Makefile]
indent_style = tab
indent_size = tab
tab_width = 4
trim_trailing_whitespace = false
Save this as .editorconfig in your repository root. Most editors read it natively; VS Code, Vim and Sublime need the EditorConfig plugin. Later sections win over earlier ones when several globs match the same file.
What is the EditorConfig Generator?
An . editorconfig file keeps indentation and line endings consistent for everyone on a project, whatever editor they use.
- Preset sections for *, Markdown, JS/TS, YAML, Makefile, Python and Go
- Per-language defaults that respect each format's real requirements
- All eight standard EditorConfig properties, each individually settable or omitted
- Add, remove and temporarily disable sections without losing your settings
- Live preview of the finished file with copy and download
- Runs entirely in your browser — nothing is uploaded
How to use the EditorConfig Generator
- 1
Leave root = true enabled so editors stop searching parent directories for another config.
- 2
Enable or disable each preset section, or edit its glob to match your project's layout.
- 3
Set indent_style, indent_size, end_of_line, charset and max_line_length per section.
- 4
Tick trim_trailing_whitespace and insert_final_newline where you want them enforced.
- 5
Add extra sections if you need them, then copy or download the file as .editorconfig.
About the EditorConfig Generator
An .editorconfig file keeps indentation and line endings consistent for everyone on a project, whatever editor they use. This generator gives you a section per file type with sensible defaults already selected, so you can adjust what you need and copy the finished file.
The preset sections reflect how each format actually behaves: Markdown keeps its trailing whitespace because two spaces mean a hard line break, Makefiles use real tabs because make requires them, and YAML uses spaces because the format forbids tabs for indentation entirely.
Every property offered comes straight from the EditorConfig specification — indent_style, indent_size, tab_width, end_of_line, charset, trim_trailing_whitespace, insert_final_newline and max_line_length — and any one of them can be left unset if you would rather not enforce it. The file is built in your browser as you edit and is never uploaded.
Frequently asked questions
What is an .editorconfig file?
It is a small config file that tells editors how to format files in a project — indentation, line endings, character set and so on. Many editors read it natively, and the rest support it through a plugin, so everyone gets consistent formatting without arguing in pull requests.
Where should I put .editorconfig?
In the root of your repository. Editors search upwards from the file being edited until they find a file containing root = true, so setting that in your top-level config stops the search escaping into a developer's home directory.
What does root = true do?
It marks the file as the top of the search. Without it, editors keep walking up the directory tree and may apply settings from a config outside your project, which produces confusing results on other people's machines.
Which section wins when several globs match a file?
Later sections override earlier ones, property by property. That is why a broad [*] section belongs at the top and narrower ones like [*.md] come afterwards.
Why does the Markdown section keep trailing whitespace?
Because two trailing spaces are a hard line break in Markdown. Trimming them silently changes how the document renders, so trim_trailing_whitespace is deliberately set to false for .md files.
Does .editorconfig replace Prettier or ESLint?
No. EditorConfig handles basic whitespace settings that every editor understands, while formatters and linters handle language-aware rules. They work well together, and most formatters will read your .editorconfig for indentation.
Related tools
Dockerfile Generator
Generate a production-ready Dockerfile and matching .dockerignore for Node, Python, Go, PHP, Java or static sites, with multi-stage builds and a non-root user.
GitHub Actions Workflow Generator
Build a .github/workflows CI file from a form: triggers, runner OS, language version matrix, dependency caching, permissions and lint, test and build steps.
README Generator
Build a professional README.md from a form: badges, features, install and usage code blocks, options and environment tables, and an auto-generated table of contents.
CSS Specificity Calculator
Calculate CSS selector specificity as (A,B,C) per Selectors Level 4, including :is(), :not(), :has() and :where(), and rank selectors to see which rule wins.