.editorconfig Generator — Consistent Indentation for Every Editor

Make every editor on your team use the same indentation, line endings and charset. Pick a preset, adjust the defaults and per-file sections (Markdown, Python, Go, Makefile…) and download your .editorconfig.

Runs in your browser
.editorconfig

Your data never leaves your computer. All processing happens 100% locally in your browser.

How to use the .editorconfig Generator

  1. Choose a preset close to your project — Web, Node, Python, Go or a Makefile project.
  2. Adjust the defaults in the [*] section: indent style and size, line endings, charset, whitespace rules.
  3. Add or edit sections for specific files using globs like *.md, *.{json,yml} or Makefile.
  4. Download the file into your repository root. VS Code needs the EditorConfig extension; JetBrains IDEs support it out of the box.

EditorConfig properties

PropertyValuesEffect
indent_stylespace, tabSpaces or tabs for indentation
indent_size2, 4, tabWidth of one indentation level
end_of_linelf, crlf, crLine endings — use lf in most repos
charsetutf-8, utf-8-bom, latin1…File encoding
trim_trailing_whitespacetrue, falseRemove spaces at line ends on save
insert_final_newlinetrue, falseEnsure files end with a newline
max_line_lengthnumber, offGuide/hard wrap in supporting editors

Why Markdown and Makefiles get their own sections

In Markdown two trailing spaces create a line break, so trim_trailing_whitespace = false for *.md. Makefiles require real tab characters for recipe lines, and Go’s gofmt uses tabs too. Python’s PEP 8 recommends 4 spaces.

EditorConfig vs Prettier

EditorConfig controls how your editor writes files as you type; formatters like Prettier rewrite them on save or in CI. They work together — Prettier even reads .editorconfig for indentation and line endings. Add the file next to your .gitignore and package.json, and format existing code with the JavaScript, CSS or HTML Formatter.

Tools that pair well with the .editorconfig Generator

  • GitHub Actions Workflow Generator — Choose your stack, triggers and steps and get a commented .github/workflows/ci.yml — install, cache, lint, test, build, a version matrix and optional deploy to GitHub Pages, Vercel or a container registry.
  • Git Command Generator — Pick a task like “undo the last commit but keep my changes” or “rename a branch on GitHub”, fill in your branch names and get the exact Git commands — each line explained, risky steps flagged.
  • .env File Validator — Paste a .env file to find invalid keys, duplicates, empty values and quoting mistakes, compare it with .env.example to spot missing variables, and generate a safe example file.
  • Semantic Version Calculator — Everything about semantic versions in one place: compare two versions, calculate the next major/minor/patch/prerelease, and see exactly which versions an npm range like ^1.2.0 or ~2.3 allows — explained in plain English.

Frequently asked questions

Where do I put .editorconfig?
In the root of your repository. Editors look for .editorconfig files from the opened file’s folder upwards and stop at a file with root = true.
Does VS Code support EditorConfig?
Yes, with the official “EditorConfig for VS Code” extension. JetBrains IDEs, Visual Studio, Vim (9+/Neovim), Sublime (plugin) and many others support it too.
Tabs or spaces?
Follow your language’s convention: 2 spaces for JavaScript, CSS, HTML, JSON and YAML; 4 spaces for Python, Java and C#; tabs for Go and Makefiles. Consistency inside one repository matters most.
Should I use LF or CRLF?
LF for almost every repository, including those developed on Windows — Git and modern editors handle it. Keep CRLF only for Windows-specific files like .bat or .cmd.

Related tools