.editorconfig

What is a .editorconfig file?

Cross-editor formatting rules — indent size, charset, line endings — so your team doesn't argue about tabs vs spaces in every PR.

Safe format
Type Code
By EditorConfig contributors
MIME text/plain

Drop any file to identify it

No upload. No signup. No sending your file halfway across the internet.
We tell you what it is, right here in your browser.

What is it

EditorConfig is the closest thing the development world has to a peace treaty between text editors. The .editorconfig file lives at your project root and tells whichever editor a contributor is using — VS Code, IntelliJ, Vim, Sublime, Emacs — to apply the same indentation, charset, and line-ending rules. Stop arguing about tabs vs spaces. Stop fighting auto-format settings. Add an .editorconfig and everyone's editor agrees.

The syntax is INI-style. A `[*]` section applies to all files. `[*.{js,ts,jsx,tsx}]` applies to JavaScript/TypeScript only. Inside each section, the common keys are `indent_style` (tab or space), `indent_size`, `end_of_line` (lf, crlf), `charset` (utf-8), `trim_trailing_whitespace`, and `insert_final_newline`. Set `root = true` at the top of the file so editors know to stop walking up the directory tree looking for parent .editorconfig files.

IntelliJ products read .editorconfig natively. VS Code, Sublime, Atom, Vim, Emacs, and Notepad++ need a small plugin (free, install once and forget). The full spec lives at editorconfig.org. .editorconfig pairs well with formatters like Prettier, ESLint, or Black — EditorConfig handles the basic editor-level settings, and the formatter handles language-specific rules. Both reading the same source of truth keeps your codebase consistent without any one tool being the gatekeeper.

Technical details
Full Name
.editorconfig
MIME Type
text/plain
Developer
EditorConfig contributors
Magic Bytes
N/A
Safety
.editorconfig is a known, safe format.
What opens it
Any text editor
FREE All
VS Code
FREE All
IntelliJ IDEA
PAID All

* Requires EditorConfig extension * Built-in support

FAQ
Does .editorconfig replace Prettier or ESLint?
No, they solve different problems. .editorconfig handles basic editor-level settings (indent, charset, line endings) across any file type. Prettier and ESLint do language-aware formatting and linting. Most projects use both, with .editorconfig as the foundation everyone's editor reads.
Why is `root = true` needed at the top of the file?
EditorConfig walks up the directory tree looking for parent .editorconfig files and merges them. `root = true` tells it to stop at this file and not look further up. Without it, a stray .editorconfig in your home directory could affect your project.
Related formats