.editorconfig Generator
Pick your project type and coding style to instantly generate a ready-to-paste .editorconfig file. Configure indent style, line endings, charset, and more. Runs entirely in your browser -- nothing is sent to any server.
About this tool
An .editorconfig file sits in the root of your project and tells every editor — VS Code, PhpStorm, Vim, Neovim, Sublime Text, and more — how to format code consistently. When a developer opens a file, the editor reads .editorconfig and automatically applies the right indent style, line endings, charset, and trailing-whitespace rules. No per-user settings, no arguments about tabs vs. spaces.
This tool generates a standards-compliant .editorconfig for common project types. Choose your project type to get sensible defaults, or dial in every option manually. The PHP / WordPress preset follows the WordPress Coding Standards (tabs, LF line endings, UTF-8). The Root .editorconfig checkbox adds the root = true declaration that tells editors to stop searching parent directories for more config files -- almost always what you want.
Common settings explained
- indent_style —
taborspace. Tabs are required by WordPress, preferred by Go. Spaces are common in Python (PEP 8), JavaScript, and TypeScript communities. - indent_size — Only relevant when using spaces. 2 is standard for JS/TS/HTML; 4 is standard for Python.
- end_of_line —
lf(Unix) is recommended for almost all projects.crlfis only needed on legacy Windows-only codebases. Mixed line endings cause endless Git diffs. - charset —
utf-8is correct for virtually every modern project. Avoidutf-8-bomunless you are working with tools that require it (some older Microsoft tooling). - trim_trailing_whitespace — Removes invisible spaces at line ends. Keeps diffs clean.
- insert_final_newline — POSIX defines a text file as ending with a newline. Many tools (Git, compilers, linters) behave better when this is present.
Once you have downloaded or copied the file, place it at the root of your repository and commit it. Most editors support EditorConfig natively or through a free plugin. Check editorconfig.org for the full plugin list.